Moving from gunicorn to uwsgi in Dockerfile
See original GitHub issueUsing uwsgi instead of gunicorn has some advantages, like having cronjobs and it’s configureable with an uwsgi.ini
[uwsgi]
http = 0.0.0.0:8000
master = True
processes = 8
threads = 2
module = <projectname>.wsgi
gid = www-data
uid = www-data
# Once an hour
cron = -0 -1 -1 -1 -1 python manage.py update_index
cron = -0 -1 -1 -1 -1 python manage.py publish_scheduled_pages
# Once a day
cron = -0 -0 -1 -1 -1 python manage.py search_garbage_collect
I can open a PR if you are interested in
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Docker how to Django + uwsgi/gunicorn + nginx? - Server Fault
I'm currently building a django app the way you want. I use docker-compose to do this. This is my docker-compose.yml
Read more >Do you still use gunicorn or uwsgi in your containers ? : r/docker
I use gunicorn/uwsgi extensively for systemd services. Does it make sense to continue to use them inside containers ?
Read more >Dockerizing Django with Postgres, Gunicorn, and Nginx
This tutorial details how to configure Django to run on Docker along with Postgres, Nginx, and Gunicorn.
Read more >How to Deploy old Django project using NGINX, Docker and ...
How does a regular Django project structure look like for UWSGI · How to package the Django app in a Docker container along...
Read more >Deploying Django with Docker Compose, Gunicorn and Nginx
How to deploy a Django project in a production environment using Docker Compose.Django is run in production using a WSGI server such as ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @Speedy1991! I knew uwsgi could handle cronjobs but I didn’t realise that it could all be configured in a single file like this.
I don’t think we should switch from Gunicorn - our intention with the Dockerfile was to provide the simplest working template for Docker-based deployments, rather than an our opinion on best practices, which are often controversial and quickly outdated.
However, it would be great to take advantage of your expertise in this area. Would you consider one or more of
?
Forgot this issue - this will be the gist to follow: https://gist.github.com/Speedy1991/8d2783a90562e098c0d9220b260b13f8