fix(compose): move migrations into api container next to collectstatic
The overall process runs faster than in a separate container, which reduces recreation times while developing.
This commit is contained in:
parent
f21795ede3
commit
df2e34e61c
|
@ -40,7 +40,7 @@ x-django: &django
|
|||
services:
|
||||
front:
|
||||
build:
|
||||
context: ../front
|
||||
context: ./front
|
||||
dockerfile: Dockerfile.dev
|
||||
ports:
|
||||
- "${VUE_PORT:-8080}:${VUE_PORT:-8080}"
|
||||
|
@ -67,12 +67,6 @@ services:
|
|||
service: celeryworker
|
||||
<<: *django
|
||||
|
||||
migrate:
|
||||
extends:
|
||||
file: ./compose/app.django.yml
|
||||
service: migrate
|
||||
<<: *django
|
||||
|
||||
nginx:
|
||||
extends:
|
||||
file: ./compose/app.nginx.yml
|
||||
|
|
|
@ -2,7 +2,7 @@ x-django: &django
|
|||
image: funkwhale-api
|
||||
volumes:
|
||||
- ../api:/app
|
||||
- "${MUSIC_DIRECTORY_SERVE_PATH-../.state/music}:/music:ro"
|
||||
- "${MUSIC_DIRECTORY_SERVE_PATH:-../.state/music}:/music:ro"
|
||||
- "../.state/plugins:/srv/funkwhale/plugins"
|
||||
- "../.state/staticfiles:/staticfiles"
|
||||
- "../.state/media:/protected/media"
|
||||
|
@ -23,20 +23,13 @@ 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/"
|
||||
bash -c "
|
||||
funkwhale-manage migrate &&
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue