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
args:
install_dev_deps: 1
depends_on:
migrate:
condition: service_completed_successfully
command: >
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/"
celeryworker:
<<: *django
depends_on:
migrate:
condition: service_completed_successfully
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
<<: *federation
migrate:
extends:
file: ./app.django.yml
service: migrate
<<: *federation
nginx:
extends:
file: ./app.nginx.yml

View File

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