mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
init: set the DB_TYPE variable only if it has not already been set
This commit is contained in:
parent
63f0ef4c0a
commit
0743c4f53f
@ -83,11 +83,11 @@ REDIS_PORT=${REDIS_PORT:-6379}
|
||||
# requires that the mysql or postgresql containers have exposed
|
||||
# port 3306 and 5432 respectively.
|
||||
if [ -n "${MYSQL_PORT_3306_TCP_ADDR}" ]; then
|
||||
DB_TYPE=mysql
|
||||
DB_TYPE=${DB_TYPE:-mysql}
|
||||
DB_HOST=${DB_HOST:-${MYSQL_PORT_3306_TCP_ADDR}}
|
||||
DB_PORT=${DB_PORT:-${MYSQL_PORT_3306_TCP_PORT}}
|
||||
elif [ -n "${POSTGRESQL_PORT_5432_TCP_ADDR}" ]; then
|
||||
DB_TYPE=postgres
|
||||
DB_TYPE=${DB_TYPE:-postgres}
|
||||
DB_HOST=${DB_HOST:-${POSTGRESQL_PORT_5432_TCP_ADDR}}
|
||||
DB_PORT=${DB_PORT:-${POSTGRESQL_PORT_5432_TCP_PORT}}
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user