{"id":15633102,"url":"https://github.com/pawamoy/docker-nginx-postgres-django-example","last_synced_at":"2025-04-13T09:44:59.869Z","repository":{"id":31139533,"uuid":"119714300","full_name":"pawamoy/docker-nginx-postgres-django-example","owner":"pawamoy","description":"Example using Docker, Django, multiple Postgres databases, NginX, Gunicorn, pipenv, GitLab CI and tox.","archived":false,"fork":false,"pushed_at":"2023-09-26T19:19:05.000Z","size":43,"stargazers_count":162,"open_issues_count":0,"forks_count":72,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-27T01:11:53.888Z","etag":null,"topics":["django","docker","docker-compose","docker-example","gunicorn","nginx","pipenv","postgresql","tox"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pawamoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-01-31T16:39:50.000Z","updated_at":"2024-12-16T17:13:14.000Z","dependencies_parsed_at":"2022-08-07T16:15:22.010Z","dependency_job_id":"dd5b0282-4e61-4f9c-9193-0c584301acd6","html_url":"https://github.com/pawamoy/docker-nginx-postgres-django-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawamoy%2Fdocker-nginx-postgres-django-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawamoy%2Fdocker-nginx-postgres-django-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawamoy%2Fdocker-nginx-postgres-django-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawamoy%2Fdocker-nginx-postgres-django-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pawamoy","download_url":"https://codeload.github.com/pawamoy/docker-nginx-postgres-django-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248694190,"owners_count":21146945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","docker","docker-compose","docker-example","gunicorn","nginx","pipenv","postgresql","tox"],"created_at":"2024-10-03T10:46:56.411Z","updated_at":"2025-04-13T09:44:59.843Z","avatar_url":"https://github.com/pawamoy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example using Docker, Django, multiple Postgres databases, NginX, Gunicorn, pipenv, GitLab CI and tox\nThis is a [Docker][] setup for a web application based on Django.\n\n- The [Django][] application is served by [Gunicorn][] (WSGI application).\n- We use [NginX][] as reverse proxy and static files server. Static and media files are\n  persistently stored in volumes.\n- Multiple [Postgres][] databases can be used. Data are persistently stored in volumes.\n- [Python][] dependencies are managed through [pipenv][], with `Pipfile` and `Pipfile.lock`.\n- Support for multiple environment settings (variable `DJANGO_SETTINGS_MODULE` is passed\n  to the `djangoapp` service).\n- Tests are run using [tox][], [pytest][], and other tools such as [safety][], [bandit][], [isort][] and [prospector][].\n- Continuous Integration is configured for [GitLab][] with `.gitlab-ci.yml`.\n  CI follows a Build-Test-Release flow. **WARNING**: this part is not fully functional yet.\n\nAlso a [Makefile][] is available for convenience. You might need to use `sudo make`\ninstead of just `make` because `docker` and `docker-compose` commands often needs\nadmin privilege.\n\n## Requirements\nYou need to install [Docker][] and [Docker-Compose][].\n\n## Build\n`docker-compose build` or `make build`.\n\n## Migrate databases\n`docker-compose run --rm djangoapp hello/manage.py migrate` or `make migrate`.\n\n## Collect static files\n`docker-compose run --rm djangoapp hello/manage.py collectstatic --no-input'` or `make collectstatic`.\n\n## Run\n`docker-compose up` or `make run`.\n\n## Tests\n- `make checksafety`\n- `make checkstyle`\n- `make test`\n- `make coverage`\n\n[Docker]: https://www.docker.com/\n[Django]: https://www.djangoproject.com/\n[Gunicorn]: http://gunicorn.org/\n[NginX]: https://www.nginx.com/\n[Postgres]: https://www.postgresql.org/\n[Python]: https://www.python.org/\n[pipenv]: https://docs.pipenv.org/\n[tox]: https://tox.readthedocs.io/en/latest/\n[pytest]: https://docs.pytest.org/en/latest/\n[safety]: https://pyup.io/safety/\n[bandit]: https://github.com/openstack/bandit\n[isort]: https://github.com/timothycrosley/isort\n[prospector]: https://github.com/landscapeio/prospector\n[GitLab]: https://about.gitlab.com/\n[Makefile]: https://www.gnu.org/software/make/manual/make.html\n[Docker-Compose]: https://docs.docker.com/compose/\n\n## Related blog post\n[Docker Compose with NginX, Django, Gunicorn and multiple Postgres databases][post]\n\n[post]: http://pawamoy.github.io/2018/02/01/docker-compose-django-postgres-nginx.html\n\n## License\nSoftware licensed under the [ISC license](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawamoy%2Fdocker-nginx-postgres-django-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpawamoy%2Fdocker-nginx-postgres-django-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawamoy%2Fdocker-nginx-postgres-django-example/lists"}