diff --git a/abra.sh b/abra.sh index a26aebe..edf3403 100644 --- a/abra.sh +++ b/abra.sh @@ -1,2 +1,2 @@ -export ENTRYPOINT_CONF_VERSION=v10 +export ENTRYPOINT_CONF_VERSION=v11 export PG_BACKUP_VERSION=v1 diff --git a/compose.postgresql.yml b/compose.postgresql.yml index 6fc8ee5..71d87b2 100644 --- a/compose.postgresql.yml +++ b/compose.postgresql.yml @@ -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 diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl index 960b23a..da23531 100644 --- a/entrypoint.sh.tmpl +++ b/entrypoint.sh.tmpl @@ -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