renaming vars
This commit is contained in:
parent
39ab636154
commit
2064929845
|
@ -72,12 +72,10 @@ IDHUB_ENABLE_2FACTOR_AUTH=false
|
|||
IDHUB_ENABLE_DOMAIN_CHECKER=false
|
||||
IDHUB_PREDEFINED_TOKEN='27f944ce-3d58-4f48-b068-e4aa95f97c95'
|
||||
|
||||
|
||||
|
||||
#POSTGRES VARS
|
||||
|
||||
DB_NAME="devicehub"
|
||||
DB_USER="ereuse"
|
||||
DB_PASSWORD="ereuse"
|
||||
DB_DOMAIN=localhost
|
||||
DB_PORT=8000
|
||||
DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
|
|
|
@ -136,9 +136,9 @@ DATABASES = {
|
|||
'default': {
|
||||
'ENGINE': os.getenv('DB_ENGINE', 'django.db.backends.postgresql'),
|
||||
'NAME': os.getenv('DB_NAME', 'devicehub'),
|
||||
'USER': os.getenv('DB_USER', 'devicehub'),
|
||||
'PASSWORD': os.getenv('DB_PASSWORD', 'devicehub'),
|
||||
'HOST': os.getenv('DB_HOST', 'postgres'),
|
||||
'USER': os.getenv('DB_USER', 'ereuse'),
|
||||
'PASSWORD': os.getenv('DB_PASSWORD', 'ereuse'),
|
||||
'HOST': os.getenv('DB_HOST', 'devicehub-postgres'),
|
||||
'PORT': os.getenv('DB_PORT', '5432'),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,24 +21,18 @@ services:
|
|||
ports:
|
||||
- ${DEVICEHUB_PORT:-8000}:${DEVICEHUB_PORT:-8000}
|
||||
depends_on:
|
||||
- postgres
|
||||
- devicehub-postgres
|
||||
|
||||
devicehub-postgres:
|
||||
image: postgres:17
|
||||
environment:
|
||||
- DB_NAME=${DB_NAME:-devicehub}
|
||||
- db_USER=${DB_USER:-devicehub}
|
||||
- db_PASSWORD=${DB_PASSWORD:-devicehub}
|
||||
- POSTGRES_DB=${DB_NAME}
|
||||
- POSTGRES_USER=${DB_USER}
|
||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||
volumes:
|
||||
- pg_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- ${DB_PORT}:${DB_PORT}
|
||||
|
||||
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
|
||||
#ports:
|
||||
# - ${DB_PORT}:${DB_PORT}
|
||||
|
||||
# TODO add database service for idhub, meanwhile sqlite
|
||||
|
||||
|
@ -76,3 +70,6 @@ volumes:
|
|||
- 9001:9001
|
||||
|
||||
# TODO add database service for idhub, meanwhile sqlite
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
|
|
|
@ -6,6 +6,7 @@ set -u
|
|||
set -x
|
||||
|
||||
program_dir='/opt/devicehub-django'
|
||||
#source .env
|
||||
. "${program_dir}/.env"
|
||||
|
||||
wait_for_postgres() {
|
||||
|
@ -45,11 +46,11 @@ gen_env_vars() {
|
|||
ADMIN='True'
|
||||
PREDEFINED_TOKEN="${PREDEFINED_TOKEN:-}"
|
||||
|
||||
DB_NAME=${DB_NAME:-devicehub}
|
||||
DB_USER=${DB_USER:-ereuse}
|
||||
DB_PASSWORD=${DB_PASSWORD:-ereuse}
|
||||
DB_HOST=${DB_HOST:-localhost}
|
||||
DB_PORT=${DB_PORT:-5432}
|
||||
DB_NAME="${DB_NAME:-devicehub}"
|
||||
DB_USER="${DB_USER:-ereuse}"
|
||||
DB_PASSWORD="${DB_PASSWORD:-ereuse}"
|
||||
DB_HOST="${DB_HOST:-localhost}"
|
||||
DB_PORT="${DB_PORT:-5432}"
|
||||
|
||||
# specific dpp env vars
|
||||
if [ "${DPP:-}" = 'true' ]; then
|
||||
|
|
Loading…
Reference in a new issue