Docker + Django + Nginx + uWSGI + Postgres
MIT license
-
Run
docker-compose run app django-admin.py startproject [project name] .
-
Modify [project name] in
uwsgi.ini
to your own django project name -
Modify db configuration in
docker-compose.yml
andDATABASE
field in[project name].settings.py
like
DATABASE = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '[your db name!]',
'USER': '[your user name !]',
'PASSWORD': '[your password !]',
'HOST': 'db',
'PORT': '5432',
'TEST': {
'NAME': 'api_test',
},
}
}
-
Run
docker-compose up
-
access browser
0.0.0.0
,127.0.0.1
orlocalhost
at port80