Read database host and user from environment (used by CI pipeline)
This commit is contained in:
parent
0e4068cea8
commit
ae6548e168
2 changed files with 4 additions and 0 deletions
|
@ -9,6 +9,8 @@ run-tests:
|
|||
services:
|
||||
- postgres:latest
|
||||
variables:
|
||||
DATABASE_HOST: postgres
|
||||
DATABASE_USER: postgres
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
before_script:
|
||||
- dnf install -y python3-devel python3-pip libpq-devel openldap-devel gcc
|
||||
|
|
|
@ -28,6 +28,8 @@ except ModuleNotFoundError:
|
|||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': uncloud.secrets.POSTGRESQL_DB_NAME,
|
||||
'HOST': os.environ.get('DATABASE_HOST'),
|
||||
'USER': os.environ.get('DATABASE_USER'),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue