Skip to content
Snippets Groups Projects
Commit 90168cd5 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

More production like docker-compose, tweaked static_url so it does not clash with the frontend

parent 298baff1
No related branches found
No related tags found
No related merge requests found
...@@ -67,3 +67,6 @@ mailhog ...@@ -67,3 +67,6 @@ mailhog
*.sqlite3 *.sqlite3
music music
media
staticfiles
static
...@@ -199,7 +199,7 @@ CRISPY_TEMPLATE_PACK = 'bootstrap3' ...@@ -199,7 +199,7 @@ CRISPY_TEMPLATE_PACK = 'bootstrap3'
STATIC_ROOT = str(ROOT_DIR('staticfiles')) STATIC_ROOT = str(ROOT_DIR('staticfiles'))
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
STATIC_URL = '/static/' STATIC_URL = env("STATIC_URL", default='/static/')
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
STATICFILES_DIRS = ( STATICFILES_DIRS = (
......
...@@ -10,4 +10,4 @@ cat demo/demo-user.py | python manage.py shell --plain ...@@ -10,4 +10,4 @@ cat demo/demo-user.py | python manage.py shell --plain
echo "Importing demo tracks..." echo "Importing demo tracks..."
python manage.py import_files "/app/music/**/*.ogg" --recursive --noinput python manage.py import_files "/music/**/*.ogg" --recursive --noinput
version: '2'
services:
postgres:
image: postgres:9.5
api:
build: .
links:
- postgres
- redis
command: ./compose/django/gunicorn.sh
env_file: .env
volumes:
- ./media:/app/funkwhale_api/media
- ./staticfiles:/app/staticfiles
- ./music:/music
ports:
- "127.0.0.1:6001:5000"
redis:
image: redis:3.0
celeryworker:
build: .
env_file: .env
links:
- postgres
- redis
command: celery -A funkwhale_api.taskapp worker -l INFO
volumes:
- ./media:/app/funkwhale_api/media
- ./music:/music
environment:
- C_FORCE_ROOT=True
celerybeat:
build: .
env_file: .env
links:
- postgres
- redis
command: celery -A funkwhale_api.taskapp beat -l INFO
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment