feat: add postgres database service to docker-compose
This commit is contained in:
+16
-2
@@ -16,13 +16,27 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
volumes:
|
volumes:
|
||||||
- data-volume:/app/data
|
|
||||||
- uploads-volume:/app/uploads
|
- uploads-volume:/app/uploads
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
|
- DATABASE_URL=postgresql://titan_user:titan_secure_pass@db:5432/titan_db
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=false"
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=titan_user
|
||||||
|
- POSTGRES_PASSWORD=titan_secure_pass
|
||||||
|
- POSTGRES_DB=titan_db
|
||||||
|
volumes:
|
||||||
|
- db-data:/var/lib/postgresql/data
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=false"
|
- "traefik.enable=false"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
data-volume:
|
|
||||||
uploads-volume:
|
uploads-volume:
|
||||||
|
db-data:
|
||||||
|
|||||||
Reference in New Issue
Block a user