Fixed some issues with staticfiles not being served in dev after switch to uvicorn
This commit is contained in:
parent
5b7fad0bef
commit
0a71d160a5
7
dev.yml
7
dev.yml
|
@ -49,11 +49,14 @@ services:
|
||||||
args:
|
args:
|
||||||
install_dev_deps: 1
|
install_dev_deps: 1
|
||||||
entrypoint: compose/django/dev-entrypoint.sh
|
entrypoint: compose/django/dev-entrypoint.sh
|
||||||
command: uvicorn --reload config.asgi:application --host 0.0.0.0 --port 5000 --reload-dir config/ --reload-dir=funkwhale_api/
|
command: >
|
||||||
|
bash -c "python manage.py collectstatic --no-input
|
||||||
|
&& uvicorn --reload config.asgi:application --host 0.0.0.0 --port 5000 --reload-dir config/ --reload-dir=funkwhale_api/"
|
||||||
volumes:
|
volumes:
|
||||||
- ./api:/app
|
- ./api:/app
|
||||||
- "${MUSIC_DIRECTORY_SERVE_PATH-./data/music}:/music:ro"
|
- "${MUSIC_DIRECTORY_SERVE_PATH-./data/music}:/music:ro"
|
||||||
- "./data/plugins:/srv/funkwhale/plugins"
|
- "./data/plugins:/srv/funkwhale/plugins"
|
||||||
|
- "./data/staticfiles:/staticfiles"
|
||||||
environment:
|
environment:
|
||||||
- "FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME-localhost}"
|
- "FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME-localhost}"
|
||||||
- "FUNKWHALE_HOSTNAME_SUFFIX=funkwhale.test"
|
- "FUNKWHALE_HOSTNAME_SUFFIX=funkwhale.test"
|
||||||
|
@ -61,6 +64,7 @@ services:
|
||||||
- "FUNKWHALE_PROTOCOL=${FUNKWHALE_PROTOCOL-http}"
|
- "FUNKWHALE_PROTOCOL=${FUNKWHALE_PROTOCOL-http}"
|
||||||
- "DATABASE_URL=postgresql://postgres@postgres/postgres"
|
- "DATABASE_URL=postgresql://postgres@postgres/postgres"
|
||||||
- "CACHE_URL=redis://redis:6379/0"
|
- "CACHE_URL=redis://redis:6379/0"
|
||||||
|
- "STATIC_ROOT=/staticfiles"
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
|
@ -120,6 +124,7 @@ services:
|
||||||
- ./deploy/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro
|
- ./deploy/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro
|
||||||
- "${MEDIA_ROOT-./api/funkwhale_api/media}:/protected/media:ro"
|
- "${MEDIA_ROOT-./api/funkwhale_api/media}:/protected/media:ro"
|
||||||
- "./front:/frontend:ro"
|
- "./front:/frontend:ro"
|
||||||
|
- "./data/staticfiles:/staticfiles:ro"
|
||||||
networks:
|
networks:
|
||||||
- federation
|
- federation
|
||||||
- internal
|
- internal
|
||||||
|
|
|
@ -136,5 +136,8 @@ http {
|
||||||
internal;
|
internal;
|
||||||
alias /music;
|
alias /music;
|
||||||
}
|
}
|
||||||
|
location /staticfiles/ {
|
||||||
|
alias /staticfiles/;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue