Fix CMD_DB_URL setting for postgres
This commit is contained in:
parent
4972af78e8
commit
674cbd0431
2
abra.sh
2
abra.sh
@ -1,2 +1,2 @@
|
||||
export ENTRYPOINT_CONF_VERSION=v10
|
||||
export ENTRYPOINT_CONF_VERSION=v11
|
||||
export PG_BACKUP_VERSION=v1
|
||||
|
@ -2,7 +2,7 @@ version: "3.8"
|
||||
services:
|
||||
app:
|
||||
environment:
|
||||
- CMD_DB_URL=
|
||||
- POSTGRES_ENABLED=1
|
||||
- CMD_DB_NAME=codimd
|
||||
- CMD_DB_USER=codimd
|
||||
- CMD_DB_HOST=db
|
||||
|
@ -40,7 +40,9 @@ main() {
|
||||
|
||||
main
|
||||
|
||||
export CMD_DB_URL="${CMD_DB_URL:-postgres://$CMD_DB_USER:$CMD_DB_PASSWORD@$CMD_DB_HOST:5432/$CMD_DB_NAME}"
|
||||
if [ -n "$POSTGRES_ENABLED" ]; then
|
||||
export CMD_DB_URL="postgres://$CMD_DB_USER:$CMD_DB_PASSWORD@$CMD_DB_HOST:5432/$CMD_DB_NAME"
|
||||
fi
|
||||
|
||||
# 3wc: `source /docker-entrypoint.sh -e` to load CMD_DB_URL for CLI scripts
|
||||
if [ ! "${1-}" == "-e" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user