Reputation: 1810
i am trying to dockerize my django project using gunicorn and nginx. The setup works on my machine, but i can't get nginx to work with the unix socket inside the image.
i followed this tutorial. Since i can't use systemctl inside the container, i tried to run gunicorn as a CMD. To start Nginx, i tried restarting the container, but then my CMD is not restarted (i think?) and the container shuts down.
How should i properly reload the nginx service inside the docker container using my dockerfile?
Upvotes: 1
Views: 736
Reputation: 3271
You can use systemctl inside a container. Either configuring a systemd daemon inside the container, or using the docker-systemctl-replacement to do without. I am using that regularly to run multiple service inside one container.
Upvotes: 1