add environment for production
This commit is contained in:
parent
674dc77757
commit
4cf4584e6c
@ -4,6 +4,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/var/www/ffplayout/ffplayout
|
||||
Environment=DJANGO_SETTINGS_MODULE=daswort.settings.production
|
||||
ExecStart=/var/www/ffplayout/venv/bin/gunicorn --workers 6 --timeout 300 --log-level=info --log-file=- --access-logfile=- --bind unix:/var/www/ffplayout/ffplayout/ffplayout.sock ffplayout.wsgi:application
|
||||
KillMode=process
|
||||
User=www-data
|
||||
|
@ -12,9 +12,8 @@
|
||||
- install dependencies: `pip install -r requirements-base.txt`
|
||||
- cd in `ffplayout`
|
||||
- generate and copy secret: `python manage.py shell -c 'from django.core.management import utils; print(utils.get_random_secret_key())'`
|
||||
- open **ffplayout/settings.py**
|
||||
- open **ffplayout/settings/production.py**
|
||||
- past secret key in variable `SECRET_KEY`
|
||||
- change `DEBUG = True` to `DEBUG = False`
|
||||
- set `ALLOWED_HOSTS` with correct URL
|
||||
- set URL in `CORS_ORIGIN_WHITELIST`
|
||||
- collect static files: `python manage.py collectstatic`
|
||||
|
Loading…
x
Reference in New Issue
Block a user