fix(docker): use build args for NEXT_PUBLIC vars, remove host port exposure
Some checks failed
Workflow / ʦ TypeScript (push) Failing after 5m37s
Workflow / ⚫️ Test (push) Has been skipped

- Dockerfile: replace hardcoded NEXT_PUBLIC env vars with ARG+ENV pattern
  so the same Dockerfile works for any environment (local dev, Dokploy prod)
- docker-compose.yml: pass SUPABASE_ANON_KEY as build arg to Dockerfile
- docker-compose.yml: remove DB port 5432 exposure (not needed on server,
  services communicate via Docker network)
This commit is contained in:
Zaid Marzguioui
2026-03-31 17:57:50 +02:00
parent ebd0fd4638
commit a1470bd9f4
2 changed files with 13 additions and 5 deletions

View File

@@ -24,8 +24,6 @@ services:
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: postgres
ports:
- "${DB_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 10s
@@ -294,6 +292,10 @@ services:
build:
context: .
dockerfile: Dockerfile
args:
NEXT_PUBLIC_SITE_URL: ${SITE_URL:-https://myeasycms.de}
NEXT_PUBLIC_SUPABASE_URL: http://localhost:8000
NEXT_PUBLIC_SUPABASE_PUBLIC_KEY: ${SUPABASE_ANON_KEY}
restart: unless-stopped
depends_on:
supabase-kong: