mrchoke/nginx-unit-django

By mrchoke

Updated over 7 years ago

nginx unit playground for Django

Image
0

106

RUN

docker run   -itd \
   --name unit-django   -p 8080:8080  \
   mrchoke/nginx-unit-django:1.11.4

test

docker exec  unit-django  \
   curl  -s http://localhost:8000 

output

{
	"listeners": {},
	"applications": {}
}

CONFIG

docker exec  unit-django  \
   curl -s -XPUT http://localhost:8000 -d@/srv/app/config.json

test

docker exec  unit-django  \
   curl  -s http://localhost:8000 

output

{
     "listeners": {
         "*:8080": {
             "application": "django"
         }
     },
     "applications": {
        "django": {
		"type": "python",
     		"workers": 3,
    		"module": "wsgi",
     		"user": "root",
     		"group": "root",
     		"path": "/srv/app"
   	}
   }
}

WEB

http://localhost:8080

Django Admin

username: admin
password: unit1234

Django

docker exec -it  unit-django  bash 
./manage.py

Git

Docker Pull Command

docker pull mrchoke/nginx-unit-django