init: added support for orchardup/postgresql image

This commit is contained in:
Sameer Naik 2014-09-27 23:42:46 +05:30
parent 9b4c636866
commit 3c6dc4f451
2 changed files with 6 additions and 0 deletions

View File

@ -381,6 +381,7 @@ docker run --name=gitlab -d --link postgresql:postgresql \
The image will automatically fetch the `DB_NAME`, `DB_USER` and `DB_PASS` variables from the postgresql container using the magic of docker links and works with the following images:
- [sameersbn/postgresql](https://registry.hub.docker.com/u/sameersbn/postgresql/)
- [orchardup/postgresql](https://registry.hub.docker.com/u/orchardup/postgresql/)
## Redis

View File

@ -137,6 +137,11 @@ elif [ -n "${POSTGRESQL_PORT_5432_TCP_ADDR}" ]; then
DB_USER=${DB_USER:-${POSTGRESQL_ENV_DB_USER}}
DB_PASS=${DB_PASS:-${POSTGRESQL_ENV_DB_PASS}}
DB_NAME=${DB_NAME:-${POSTGRESQL_ENV_DB_NAME}}
# support for linked orchardup/postgresql image
DB_USER=${DB_USER:-${POSTGRESQL_ENV_POSTGRESQL_USER}}
DB_PASS=${DB_PASS:-${POSTGRESQL_ENV_POSTGRESQL_PASS}}
DB_NAME=${DB_NAME:-${POSTGRESQL_ENV_POSTGRESQL_DB}}
fi
# set default user and database