hemebond / quaddicted

Quaddicted upgrade written with Django
MIT License
7 stars 1 forks source link

Move Quaddicted production environment variables to file #12

Closed hemebond closed 4 years ago

hemebond commented 4 years ago

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.

hemebond commented 4 years ago

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