move from links to depends_on

This commit is contained in:
Jannis Gebauer 2016-03-08 10:12:55 +01:00
parent 1d7fd94ab1
commit 982b21d61b
2 changed files with 8 additions and 8 deletions

View File

@ -7,11 +7,11 @@ set -e
export REDIS_URL=redis://redis:6379
# the official postgres image uses 'postgres' as default user if not set explictly.
if [ -z "$POSTGRES_ENV_POSTGRES_USER" ]; then
export POSTGRES_ENV_POSTGRES_USER=postgres
fi
if [ -z "$POSTGRES_USER" ]; then
export POSTGRES_USER=postgres
fi
export DATABASE_URL=postgres://$POSTGRES_ENV_POSTGRES_USER:$POSTGRES_ENV_POSTGRES_PASSWORD@postgres:5432/$POSTGRES_ENV_POSTGRES_USER
export DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:5432/$POSTGRES_USER
{% if cookiecutter.use_celery == 'y' %}
export CELERY_BROKER_URL=$REDIS_URL/0
{% endif %}

View File

@ -10,7 +10,7 @@ services:
build:
context: .
user: django
links:
depends_on:
- postgres
- redis
command: /gunicorn.sh
@ -21,7 +21,7 @@ services:
nginx:
build: ./compose/nginx
links:
depends_on:
- django
ports:
- "0.0.0.0:80:80"
@ -34,7 +34,7 @@ services:
context: .
user: django
env_file: .env
links:
depends_on:
- postgres
- redis
command: celery -A {{cookiecutter.repo_name}}.taskapp worker -l INFO
@ -47,7 +47,7 @@ services:
context: .
user: django
env_file: .env
links:
depends_on:
- postgres
- redis
command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO