First of all, I want express gratitude to developers of Doppler for very cool and convenient tool!
I’m trying use doppler with Django application, which run in production with gunicorn
and systemd
. Python virtual envitonment maintaining with pipenv
, so full working config look as:
gunicorn.socket
[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target
[Service]
Type=notify
User=swasher
Group=www-data
RuntimeDirectory=gunicorn
WorkingDirectory=/home/swasher/printMES
ExecStart=/usr/bin/pipenv run gunicorn \
--access-logfile - \
--bind 0.0.0.0:8000 \
--workers 3 \
--bind unix:/home/swasher/printMES/gunicorn.sock \
printMES.wsgi:application
ExecReload=/bin/kill -s HUP $MAINPID
KillMode=mixed
TimeoutStopSec=5
PrivateTmp=true
[Install]
WantedBy=multi-user.target
At this point, my config is working well.
Now, I’m added doppler
injection, so ExecStart became as
ExecStart=doppler run -- /usr/bin/pipenv run gunicorn \
--access-logfile - \
--bind 0.0.0.0:8000 \
--workers 3 \
--bind unix:/home/swasher/printMES/gunicorn.sock \
printMES.wsgi:application
Then I start the service with following command:
# sudo systemctl start gunicorn.service
it will start sucessfully (django can get all doppler’s variables and my site running fine), but with the one problem: command do not return to shell.
And via about a minute it’s drop with following error:
Any log do not have any usefull information, with the exception of The unit gunicorn.service has entered the 'failed' state with result 'timeout'.
Do you have any idea how to make it work?