https://github.com/guycole/elder-spatula
nginx, gunicorn and django demo
https://github.com/guycole/elder-spatula
django djangorestframework docker gunicorn nginx
Last synced: about 1 month ago
JSON representation
nginx, gunicorn and django demo
- Host: GitHub
- URL: https://github.com/guycole/elder-spatula
- Owner: guycole
- Created: 2024-04-28T23:22:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-05T18:45:52.000Z (about 2 years ago)
- Last Synced: 2025-07-06T07:07:46.788Z (11 months ago)
- Topics: django, djangorestframework, docker, gunicorn, nginx
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# elder-spatula
nginx, gunicorn, django container
## configuration
+ gunicorn on port 8000
+ /api = django REST demo
+ /app = django demo
## manual step
+ must add basic auth (for REST)
+ ```python manage.py createsuperuser --username admin --email admin@example.com```
## curl
+ ```curl -v http://localhost:8000/app/```
+ ```curl -v http://localhost:8000/app/page3/```
+ ```curl -v -i -u admin -H "Content-Type: application/json" http://localhost:8000/api/simple/```
+ ```curl -v -i -u admin -H "Content-Type: application/json" -d "{\"key\":\"aaa\", \"value\":\"bbb\"}" http://localhost:8000/api/simple/```
## links
+ https://www.nginx.com/blog/deploying-nginx-nginx-plus-docker/
+ https://docs.nginx.com/nginx/admin-guide/web-server/web-server/
+ https://www.django-rest-framework.org
+ https://www.codingforentrepreneurs.com/blog/django-gunicorn-nginx-docker/
+ https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu