This is a Docker setup for a web application based on Django.
Pipfile
and Pipfile.lock
.DJANGO_SETTINGS_MODULE
is passed
to the djangoapp
service)..gitlab-ci.yml
.
CI follows a Build-Test-Release flow. WARNING: this part is not fully functional yet.Also a Makefile is available for convenience. You might need to use sudo make
instead of just make
because docker
and docker-compose
commands often needs
admin privilege.
You need to install Docker and Docker-Compose.
docker-compose build
or make build
.
docker-compose run --rm djangoapp hello/manage.py migrate
or make migrate
.
docker-compose run --rm djangoapp hello/manage.py collectstatic --no-input'
or make collectstatic
.
docker-compose up
or make run
.
make checksafety
make checkstyle
make test
make coverage
Docker Compose with NginX, Django, Gunicorn and multiple Postgres databases
Software licensed under the ISC license.
Bumps django from 2.2.26 to 2.2.28.
5c33000
[2.2.x] Bumped version for 2.2.28 release.29a6c98
[2.2.x] Fixed CVE-2022-28347 -- Protected QuerySet.explain(**options) against...2c09e68
[2.2.x] Fixed CVE-2022-28346 -- Protected QuerySet.annotate(), aggregate(), a...8352b98
[2.2.x] Added stub release notes for 2.2.28.2801f29
[2.2.x] Reverted "Fixed forms_tests.tests.test_renderers with Jinja 3.1.0+."e03648f
[2.2.x] Fixed forms_tests.tests.test_renderers with Jinja 3.1.0+.9d13d8c
[2.2.x] Fixed typo in release notes.047ece3
[2.2.x] Added CVE-2022-22818 and CVE-2022-23833 to security archive.2427b2f
[2.2.x] Post-release version bump.e541f2d
[2.2.x] Bumped version for 2.2.27 release.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Hi, I have a project ongoing and found your docker tutorial Docker Compose with NginX, Django, Gunicorn and multiple Postgres databases pretty helpful and had followed along the tutorial.
Unfortunately, I was stuck on the part that I can't migrate to
postgresql as the following command sugguest:
docker-compose run --rm djangoapp /bin/bash -c "cd hello; ./manage.py migrate"
After executing the command above, i got error message complain about
django.db.utils.OperationalError: FATAL: password authentication failed for user "database1_role"
But I could still successfully build the dockerfile
I try to run postgresql server but it complains about the host/local connection:
β test_docker git:(master) β psql
psql: error: could not connect to server: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
I look it up on stackoverflow and try to brew restart the service or rm postmaster.pid....But it does not work.
Also I try to investigate the config file pg_hba.conf which defines who gets to log in what database at /usr/local/var/postgres/pg_hba.conf.
81| # TYPE DATABASE USER ADDRESS METHOD 82| 83| # "local" is for Unix domain socket connections only 84| local all all trust 85| # IPv4 local connections: 86| host all all 127.0.0.1/32 trust 87| # IPv6 local connections: 88| host all all ::1/128 trust 89| # Allow replication connections from localhost, by a user with the 90| # replication privilege. 91| local replication all trust 92| host replication all 127.0.0.1/32 trust 93| host replication all ::1/128 trust 94| host all all 127.0.0.1/5432 trust
Still no luck. Wander anyone has some suggestions to solve the problem? Thanks!
Thank you for your excellent repo.
Just making a request for instructions regarding configuring SSL.
docker docker-compose docker-example nginx postgresql django gunicorn pipenv tox