Feat(compose): Add migrate container

co-authored-by: upsiflu@gmail.com
co-authored-by: jon@allmende.io
This commit is contained in:
ArneBo 2024-10-01 12:43:22 +02:00
parent 9b3e218d16
commit 26295c08f7
3 changed files with 22 additions and 0 deletions

View File

@ -23,10 +23,20 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
args: args:
install_dev_deps: 1 install_dev_deps: 1
depends_on:
migrate:
condition: service_completed_successfully
command: > command: >
bash -c "funkwhale-manage collectstatic --no-input bash -c "funkwhale-manage collectstatic --no-input
&& uvicorn --reload config.asgi:application --host 0.0.0.0 --port 5000 --reload-dir config/ --reload-dir=funkwhale_api/" && uvicorn --reload config.asgi:application --host 0.0.0.0 --port 5000 --reload-dir config/ --reload-dir=funkwhale_api/"
celeryworker: celeryworker:
<<: *django <<: *django
depends_on:
migrate:
condition: service_completed_successfully
command: celery -A funkwhale_api.taskapp worker -l debug -B --concurrency=${CELERYD_CONCURRENCY} command: celery -A funkwhale_api.taskapp worker -l debug -B --concurrency=${CELERYD_CONCURRENCY}
migrate:
<<: *django
command: funkwhale-manage migrate

View File

@ -50,6 +50,12 @@ services:
service: celeryworker service: celeryworker
<<: *federation <<: *federation
migrate:
extends:
file: ./app.django.yml
service: migrate
<<: *federation
nginx: nginx:
extends: extends:
file: ./app.nginx.yml file: ./app.nginx.yml

View File

@ -44,6 +44,12 @@ services:
service: celeryworker service: celeryworker
<<: *local <<: *local
migrate:
extends:
file: ./app.django.yml
service: migrate
<<: *local
nginx: nginx:
extends: extends:
file: ./app.nginx.yml file: ./app.nginx.yml