Doppler with systemd problem

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?

Hi @swasher!

Welcome to the Doppler Community!

Sorry for the delay getting back to you. I had to setup a test environment from scratch for this. I believe the issue you’re hitting is with this:

Type=notify

That indicates that systemd should wait for the starting application to issue a notification when it’s done starting up. When you’re starting using the doppler binary, no such notification is sent, so it just hangs forever. If you comment that line out (so it defaults to simple rather than notify), everything works as expected.

Could you give that a shot and see if it works for you?

Regards,
-Joel

Thank you for your help!
I need more time for testing, but at first look, problem is solved!

At least, service started successfully, and systemctrl start gunicorn... return to shell as well.