- Notifications
You must be signed in to change notification settings - Fork72
Example using Docker, Django, multiple Postgres databases, NginX, Gunicorn, pipenv, GitLab CI and tox.
License
pawamoy/docker-nginx-postgres-django-example
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Example using Docker, Django, multiple Postgres databases, NginX, Gunicorn, pipenv, GitLab CI and tox
This is aDocker setup for a web application based on Django.
- TheDjango application is served byGunicorn (WSGI application).
- We useNginX as reverse proxy and static files server. Static and media files arepersistently stored in volumes.
- MultiplePostgres databases can be used. Data are persistently stored in volumes.
- Python dependencies are managed throughpipenv, with
PipfileandPipfile.lock. - Support for multiple environment settings (variable
DJANGO_SETTINGS_MODULEis passedto thedjangoappservice). - Tests are run usingtox,pytest, and other tools such assafety,bandit,isort andprospector.
- Continuous Integration is configured forGitLab with
.gitlab-ci.yml.CI follows a Build-Test-Release flow.WARNING: this part is not fully functional yet.
Also aMakefile is available for convenience. You might need to usesudo makeinstead of justmake becausedocker anddocker-compose commands often needsadmin privilege.
You need to installDocker andDocker-Compose.
docker-compose build ormake build.
docker-compose run --rm djangoapp hello/manage.py migrate ormake migrate.
docker-compose run --rm djangoapp hello/manage.py collectstatic --no-input' ormake collectstatic.
docker-compose up ormake run.
make checksafetymake checkstylemake testmake coverage
Docker Compose with NginX, Django, Gunicorn and multiple Postgres databases
Software licensed under theISC license.
About
Example using Docker, Django, multiple Postgres databases, NginX, Gunicorn, pipenv, GitLab CI and tox.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Contributors2
Uh oh!
There was an error while loading.Please reload this page.