Add static config

This commit is contained in:
redfast00 2020-07-25 15:06:59 +02:00
parent a3891494af
commit db4074ab33
3 changed files with 6 additions and 0 deletions

View file

@ -137,6 +137,8 @@ STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
STATIC_ROOT = os.getenv('STATIC_ROOT')
# Celery
CELERY_BROKER = os.getenv('CELERY_BROKER', 'redis://localhost:6379/0')

View file

@ -8,8 +8,11 @@ services:
restart: on-failure
depends_on:
- database
volumes:
- /var/www/kers/static:/static
command: >
sh -c "./scripts/wait_for_service database 3306 &&
python manage.py collectstatic --no-input
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"

View file

@ -9,3 +9,4 @@ OAUTH_CLIENT_SECRET=REPLACEME
KERS_ADMIN_USERNAME=replaceme
KERS_ADMIN_PASSWORD=replaceme
ALLOWED_HOSTS=localhost
STATIC_ROOT=/static