-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
django quickstart fail "Database is uninitialized and superuser password is not specified." #10532
Labels
Comments
I had a similar problem. # docker-compose.yml
version: '3'
services:
db:
image: postgres
ports: #add line.
- '5432'
environment: # add line.
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db # setting.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWORD': 'postgres', #add line.
'HOST': 'db',
'PORT': 5432,
}
} Resultdocker-compose up
Recreating compose-test_db_1 ... done
Recreating compose-test_web_1 ... done
Attaching to compose-test_db_1, compose-test_web_1
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
. . .
web_1 | April 12, 2020 - 09:20:06
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. |
Thanks for your help! I am closing down the issue |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. /lifecycle locked |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Greetings, I am new to docker.
Situation
Problem
fails with
The text was updated successfully, but these errors were encountered: