N-FIN-v1.0.0: refactor docker-compose.yaml to use volume

This commit is contained in:
Markus Thielker 2024-03-11 05:22:03 +01:00
parent 2a311df419
commit 9e051618bf
No known key found for this signature in database

View file

@ -8,7 +8,7 @@ services:
depends_on:
postgres:
condition: service_healthy
command: [ "npx", "prisma", "migrate", "deploy" ]
command: npx prisma migrate deploy
labels:
- "com.centurylinklabs.watchtower.enable=true"
networks:
@ -42,7 +42,7 @@ services:
depends_on:
app-migrations:
condition: service_completed_successfully
command: "npx prisma studio"
command: npx prisma studio
restart: unless-stopped
labels:
- "traefik.enable=true"
@ -66,14 +66,19 @@ services:
timeout: 5s
retries: 5
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: finances
volumes:
- ./postgres-data:/var/lib/postgresql/data
- postgres-data:/var/lib/postgresql/data
networks:
- internal
volumes:
postgres-data:
networks:
web:
external: true