Skip to content

Commit

Permalink
Pick service endpoints from env variables created by links, if availa…
Browse files Browse the repository at this point in the history
…ble.
  • Loading branch information
rtnpro committed Sep 11, 2015
1 parent 6aaa49f commit e286e95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docker-links.conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
postgres = os.getenv('SENTRY_POSTGRES_HOST') or (os.getenv('POSTGRES_PORT_5432_TCP_ADDR') and 'postgres')
mysql = os.getenv('SENTRY_MYSQL_HOST') or (os.getenv('MYSQL_PORT_3306_TCP_ADDR') and 'mysql')
redis = os.getenv('SENTRY_REDIS_HOST') or (os.getenv('REDIS_PORT_6379_TCP_ADDR') and 'redis')
memcached = os.getenv('SENTRY_MEMCACHED_HOST') or (os.getenv('MEMCACHED_PORT_11211_TCP_ADDR') and 'memcached')
postgres = os.getenv('SENTRY_POSTGRES_HOST') or os.getenv('POSTGRES_PORT_5432_TCP_ADDR') or 'postgres'
mysql = os.getenv('SENTRY_MYSQL_HOST') or os.getenv('MYSQL_PORT_3306_TCP_ADDR') or 'mysql'
redis = os.getenv('SENTRY_REDIS_HOST') or os.getenv('REDIS_PORT_6379_TCP_ADDR') or 'redis'
memcached = os.getenv('SENTRY_MEMCACHED_HOST') or os.getenv('MEMCACHED_PORT_11211_TCP_ADDR') or 'memcached'

if postgres:
DATABASES = {
Expand Down

0 comments on commit e286e95

Please sign in to comment.