init: added support for centurylink/mysql and orchardup/mysql images

This commit is contained in:
Sameer Naik 2014-09-27 23:29:52 +05:30
parent f504a0fd14
commit 70d034642e
2 changed files with 7 additions and 0 deletions

View File

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

View File

@ -123,6 +123,11 @@ if [ -n "${MYSQL_PORT_3306_TCP_ADDR}" ]; then
DB_USER=${DB_USER:-${MYSQL_ENV_DB_USER}}
DB_PASS=${DB_PASS:-${MYSQL_ENV_DB_PASS}}
DB_NAME=${DB_NAME:-${MYSQL_ENV_DB_NAME}}
# support for linked orchardup/mysql and centurylink/mysql image
DB_USER=${DB_USER:-${MYSQL_ENV_MYSQL_USER}}
DB_PASS=${DB_PASS:-${MYSQL_ENV_MYSQL_PASSWORD}}
DB_NAME=${DB_NAME:-${MYSQL_ENV_MYSQL_DATABASE}}
elif [ -n "${POSTGRESQL_PORT_5432_TCP_ADDR}" ]; then
DB_TYPE=${DB_TYPE:-postgres}
DB_HOST=${DB_HOST:-${POSTGRESQL_PORT_5432_TCP_ADDR}}