hemebond/quaddicted

Move Quaddicted production environment variables to file

Closed this issue · 1 comments

Currently they're specified in the SystemD service file. By moving them to a separate file and using EnvironmentFile=/etc/quaddicted in the SystemD file, we can then also use it with manage.py instead of having to manually specify them.

Already in use.

[Unit]
Description=Gunicorn daemon for Quaddicted Django website
After=network.target

[Service]
User=www-data
Group=www-data
WorkingDirectory=/srv/quaddicted
EnvironmentFile=/srv/quaddicted/quaddicted.env
ExecStart=/srv/quaddicted/bin/gunicorn --access-logfile - --workers 3 --bind unix:/var/run/gunicorn/quaddicted.sock quaddicted.wsgi:application

[Install]
WantedBy=multi-user.target