update postgres initialization for compose/django.md#10624
update postgres initialization for compose/django.md#10624usha-mandya merged 2 commits intodocker:masterfrom
Conversation
|
Deploy preview for docsdocker ready! Built with commit 920975c |
|
Thank you for the update, @snoop2head. @ulyssessouza Could you PTAL? |
compose/django.md
Outdated
| services: | ||
| db: | ||
| image: postgres | ||
| ports: #add line. |
There was a problem hiding this comment.
This block can be omitted. The port is not exposed
There was a problem hiding this comment.
Just checked! Yes it can be omitted
compose/django.md
Outdated
| - "8000:8000" | ||
| depends_on: | ||
| - db | ||
| # docker-compose.yml |
There was a problem hiding this comment.
Please, remove this comment line. The previous steps already mention the filename.
compose/django.md
Outdated
| 'ENGINE': 'django.db.backends.postgresql', | ||
| 'NAME': 'postgres', | ||
| 'USER': 'postgres', | ||
| 'PASSWORD': 'postgres', #add line. |
There was a problem hiding this comment.
Please, remove the comment "#add line" from it
ulyssessouza
left a comment
There was a problem hiding this comment.
Some changes on comments and an extra block
|
Thank you @ulyssessouza. @snoop2head Could you address the feedback from Ulysses? Thanks. |
|
@ulyssessouza @usha-mandya
After making changes, I ran the django tutorial from the beginning. db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2020-04-15 17:06:40.956 UTC [1] LOG: starting PostgreSQL 12.2 (Debian 12.2-2.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
db_1 | 2020-04-15 17:06:40.957 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2020-04-15 17:06:40.957 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2020-04-15 17:06:40.959 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2020-04-15 17:06:40.972 UTC [26] LOG: database system was shut down at 2020-04-15 17:06:38 UTC
db_1 | 2020-04-15 17:06:40.976 UTC [1] LOG: database system is ready to accept connections
web_1 | Watching for file changes with StatReloader
web_1 | Performing system checks...
web_1 |
web_1 | System check identified no issues (0 silenced).
web_1 |
web_1 | You have 17 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
web_1 | Run 'python manage.py migrate' to apply them.
web_1 | April 15, 2020 - 17:06:41
web_1 | Django version 2.2.12, using settings 'composeexample.settings'
web_1 | Starting development server at http://0.0.0.0:8000/
web_1 | Quit the server with CONTROL-C. |
usha-mandya
left a comment
There was a problem hiding this comment.
Thank you @snoop2head . The updates look good.
Proposed changes
Updated postgres initialization for compose/django.md
Related issues
Issue #10532 django quickstart fail "Database is uninitialized and superuser password is not specified."