fix(deploy): inject Dokploy env into containers via env_file
The compose services declared only STORAGE_DIR and PORT under `environment`,
so DATABASE_URL, BETTER_AUTH_SECRET and the Turnstile keys never reached the
containers: `docker compose` reads the generated .env for ${VAR} interpolation
(build args) but does not pass it into services on its own. `prisma migrate
deploy` therefore started with no DATABASE_URL and both containers exited 1 in
a restart loop.
Add `env_file: [.env]` to web and worker so the Environment tab actually
becomes runtime configuration, as the file's own comment already claimed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
0c6b6c5cad
commit
8067980774
@@ -17,6 +17,12 @@ services:
|
||||
# Apply pending migrations on boot, then serve.
|
||||
command: sh -c "npx prisma migrate deploy && npm run start"
|
||||
restart: unless-stopped
|
||||
# Dokploy writes the Environment tab into a .env beside this file. Compose uses
|
||||
# that for ${VAR} interpolation (the build args above) but does NOT put it
|
||||
# inside the container — env_file is what actually injects DATABASE_URL,
|
||||
# BETTER_AUTH_SECRET, the Turnstile keys, etc. at runtime.
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
STORAGE_DIR: /app/storage
|
||||
PORT: "3000"
|
||||
@@ -40,6 +46,8 @@ services:
|
||||
image: podcast-distribution-ai:latest
|
||||
command: npx tsx worker/index.ts
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
STORAGE_DIR: /app/storage
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user