Use POSTGRES_HOST and POSTGRES_PORT instead of SQL_*
This commit is contained in:
parent
a80158da66
commit
3a5cbc6325
3 changed files with 6 additions and 13 deletions
11
Changelog.md
11
Changelog.md
|
@ -14,15 +14,8 @@ ALLOWED_HOSTS=localhost,127.0.0.1,[::1]
|
|||
POSTGRES_USER=user
|
||||
POSTGRES_PASSWORD=password
|
||||
POSTGRES_DB=app
|
||||
SQL_HOST=db
|
||||
SQL_PORT=5432
|
||||
```
|
||||
|
||||
#### .env.prod.db
|
||||
```
|
||||
POSTGRES_USER=psql_username_name
|
||||
POSTGRES_PASSWORD=psql_passwordd
|
||||
POSTGRES_DB=psql_db_name
|
||||
POSTGRES_HOST=db
|
||||
POSTGRES_PORT=5432
|
||||
```
|
||||
|
||||
Building containers
|
||||
|
|
|
@ -8,7 +8,7 @@ DATABASES = {
|
|||
'NAME': os.environ.get('POSTGRES_DB', 'app'),
|
||||
'USER': os.environ.get('POSTGRES_USER', 'app'),
|
||||
'PASSWORD': os.environ.get('POSTGRES_PASSWORD', ''),
|
||||
'HOST': os.environ.get('SQL_HOST', 'localhost'),
|
||||
'PORT': os.environ.get('SQL_PORT', ''),
|
||||
'HOST': os.environ.get('POSTGRES_HOST', 'localhost'),
|
||||
'PORT': os.environ.get('POSTGRES_PORT', 5432),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ DATABASES = {
|
|||
'NAME': os.environ.get('POSTGRES_DB', 'app'),
|
||||
'USER': os.environ.get('POSTGRES_USER', 'app'),
|
||||
'PASSWORD': os.environ.get('POSTGRES_PASSWORD', ''),
|
||||
'HOST': os.environ.get('SQL_HOST', 'localhost'),
|
||||
'PORT': os.environ.get('SQL_PORT', ''),
|
||||
'HOST': os.environ.get('POSTGRES_HOST', 'localhost'),
|
||||
'PORT': os.environ.get('POSTGRES_PORT', 5432),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue