Add a migration service on the docker compose

This commit is contained in:
Zoe Roux 2024-03-25 22:25:41 +01:00
parent d24d18ea8e
commit 646df0f393
No known key found for this signature in database
3 changed files with 28 additions and 0 deletions

View File

@ -35,11 +35,21 @@ services:
condition: service_healthy condition: service_healthy
rabbitmq: rabbitmq:
condition: service_healthy condition: service_healthy
migrations:
condition: service_completed_successfully
volumes: volumes:
- ./back:/app - ./back:/app
- /app/out/ - /app/out/
- kyoo:/kyoo - kyoo:/kyoo
migrations:
build:
context: ./back
dockerfile: Dockerfile.migrations
restart: "no"
env_file:
- ./.env
front: front:
build: build:
context: ./front context: ./front

View File

@ -26,9 +26,17 @@ services:
condition: service_healthy condition: service_healthy
rabbitmq: rabbitmq:
condition: service_healthy condition: service_healthy
migrations:
condition: service_completed_successfully
volumes: volumes:
- kyoo:/kyoo - kyoo:/kyoo
migrations:
image: zoriya/kyoo_migrations:edge
restart: "no"
env_file:
- ./.env
front: front:
image: zoriya/kyoo_front:edge image: zoriya/kyoo_front:edge
restart: unless-stopped restart: unless-stopped

View File

@ -25,9 +25,19 @@ services:
condition: service_healthy condition: service_healthy
rabbitmq: rabbitmq:
condition: service_healthy condition: service_healthy
migrations:
condition: service_completed_successfully
volumes: volumes:
- kyoo:/kyoo - kyoo:/kyoo
migrations:
build:
context: ./back
dockerfile: Dockerfile.migrations
restart: "no"
env_file:
- ./.env
front: front:
build: ./front build: ./front
restart: on-failure restart: on-failure