Update docker-compose.yml for git-based Portainer deployment
Switch from hardcoded credentials to env var substitution (DB_PASSWORD, SESSION_SECRET, ORIGIN). Use production ports (3200:3000, 3201:5432) and host.docker.internal for DB connectivity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+8
-6
@@ -4,10 +4,10 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: kanban
|
POSTGRES_USER: kanban
|
||||||
POSTGRES_PASSWORD: kanban
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||||
POSTGRES_DB: kanban
|
POSTGRES_DB: kanban
|
||||||
ports:
|
ports:
|
||||||
- '5432:5432'
|
- '3201:5432'
|
||||||
volumes:
|
volumes:
|
||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -20,11 +20,13 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- '3000:3000'
|
- '3200:3000'
|
||||||
|
extra_hosts:
|
||||||
|
- 'host.docker.internal:host-gateway'
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: postgresql://kanban:kanban@db:5432/kanban?schema=public
|
DATABASE_URL: postgresql://kanban:${DB_PASSWORD}@host.docker.internal:3201/kanban?schema=public
|
||||||
SESSION_SECRET: ${SESSION_SECRET:-change-me-in-production}
|
SESSION_SECRET: ${SESSION_SECRET}
|
||||||
ORIGIN: ${ORIGIN:-http://localhost:3000}
|
ORIGIN: ${ORIGIN:-https://kanban.catrenelle.com}
|
||||||
PORT: 3000
|
PORT: 3000
|
||||||
HOST: 0.0.0.0
|
HOST: 0.0.0.0
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
Reference in New Issue
Block a user