Sign inSign up

mrchoke/nginx-unit-django

By mrchoke

•Updated about 9 years ago

nginx unit playground for Django

Image
0

218

mrchoke/nginx-unit-django repository overview

⁠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

Tag summary

Content type

Image

Digest

Size

164 MB

Last updated

about 9 years ago

docker pull mrchoke/nginx-unit-django:1.11.4