There’s the flyctl deploy -e <k=v>
switch to overwrite envs, though, I’m unsure if it is available insider docker (during build). If it is, then that’s one possible avenue to inject DATABASE_URL
at build-time and runtime.
Note though, flyctl
overwrites all envs set via fly.toml
rather than selectively override them: Is it possible to combine both env vars from CLI flags and fly.toml config?