mirror of
https://codeberg.org/MarkusThielker/finances.git
synced 2025-04-12 05:08:43 +00:00
N-FIN-v1.0.0: refactor docker-compose.yaml to use volume
This commit is contained in:
parent
2a311df419
commit
9e051618bf
1 changed files with 10 additions and 5 deletions
|
@ -8,7 +8,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
command: [ "npx", "prisma", "migrate", "deploy" ]
|
command: npx prisma migrate deploy
|
||||||
labels:
|
labels:
|
||||||
- "com.centurylinklabs.watchtower.enable=true"
|
- "com.centurylinklabs.watchtower.enable=true"
|
||||||
networks:
|
networks:
|
||||||
|
@ -42,7 +42,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
app-migrations:
|
app-migrations:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
command: "npx prisma studio"
|
command: npx prisma studio
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
|
@ -66,14 +66,19 @@ services:
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: prisma
|
POSTGRES_USER: ${DB_USER}
|
||||||
POSTGRES_PASSWORD: prisma
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||||
POSTGRES_DB: finances
|
POSTGRES_DB: finances
|
||||||
volumes:
|
volumes:
|
||||||
- ./postgres-data:/var/lib/postgresql/data
|
- postgres-data:/var/lib/postgresql/data
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres-data:
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
web:
|
web:
|
||||||
external: true
|
external: true
|
||||||
|
|
Loading…
Add table
Reference in a new issue