I'm building a docker image & inside it I need gunicorn service to serve django with nginx reverse proxying.
The build process works fine, but I noticed it doesn't recognize gunicorn service when I start it like this
# systemctl start gunicorn
the gunicorn file's supposed to be copied in
/etc/systemd/system directory. I started to investifate by opening a bash session into container, and noticed following.
/etc/systemd/systemdirectory rather inside
even if I use service command, it says unrecognized service.
service gunicorn start
Below are the contents of my service file
cat /etc/systemd/system/gunicorn.service [Unit] Description=gunicorn daemon After=network.target [Service] User=www-data Group=www-data WorkingDirectory=/app ExecStart=/usr/local/gunicorn --access-logfile - --workers 3 --bind unix:/app/gunicorn.sock myproject.wsgi:application [Install] WantedBy=multi-user.target
so does anyone have any idea of it, and suggest me how to make this custom service work inside this image/container??