Fix api build

This commit is contained in:
Montech
2026-09-15 17:32:23 +03:30
parent 3bc97461e0
commit a70a5445eb
2 changed files with 11 additions and 1 deletions
+7
View File
@@ -2,3 +2,10 @@
# (no longer a Docker build arg — images only copy pre-built files).
# VITE_CLIENT_PUBLIC_URL=https://wheel.example.com
VITE_CLIENT_PUBLIC_URL=http://localhost:5174
# Docker / Dokploy — API DATABASE_URL is derived from these (do not set DATABASE_URL).
# Postgres only applies POSTGRES_PASSWORD on first volume init; changing it later
# does nothing unless you recreate the pg_data volume.
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgrespassword
POSTGRES_DB=lucky_wheel
+4 -1
View File
@@ -43,7 +43,10 @@ services:
redis:
condition: service_healthy
environment:
- DATABASE_URL=${DATABASE_URL:-postgresql://postgres:postgrespassword@postgres:5432/lucky_wheel?schema=public}
# Always built from the same POSTGRES_* vars as the db service.
# A separate DATABASE_URL in Dokploy (e.g. password "postgres" from another
# stack) was authenticating as user postgres with the wrong password (P1000).
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgrespassword}@postgres:5432/${POSTGRES_DB:-lucky_wheel}?schema=public
- PORT=${PORT:-3000}
- NODE_ENV=production
- REDIS_HOST=redis