chore: remove standalone postgres-db for swarm deployments
This commit is contained in:
1 parent
982182ef5b
commit
5659aad0ac
1 file changed
+2
-19
+2
-19
@@ -1,33 +1,16 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
postgres-db:
|
||||
image: postgres:15-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=${DB_USER:-admin}
|
||||
- POSTGRES_PASSWORD=${DB_PASSWORD:-password}
|
||||
- POSTGRES_DB=${DB_NAME:-inventory}
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
inventory-app:
|
||||
image: git.proit.id/ypratama/portal-inventory:latest
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=${DATABASE_URL:-postgresql://${DB_USER:-admin}:${DB_PASSWORD:-password}@postgres-db:5432/${DB_NAME:-inventory}?schema=public}
|
||||
- SESSION_SECRET=${SESSION_SECRET:-default_secret_please_change}
|
||||
- DATABASE_URL=${DATABASE_URL}
|
||||
- SESSION_SECRET=${SESSION_SECRET}
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
depends_on:
|
||||
- postgres-db
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
Reference in new issue
Block a user