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 export REDIS_URL=redis://redis:6379
# the official postgres image uses 'postgres' as default user if not set explictly. # the official postgres image uses 'postgres' as default user if not set explictly.
if [ -z "$POSTGRES_ENV_POSTGRES_USER" ]; then if [ -z "$POSTGRES_USER" ]; then
export POSTGRES_ENV_POSTGRES_USER=postgres export POSTGRES_USER=postgres
fi 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' %} {% if cookiecutter.use_celery == 'y' %}
export CELERY_BROKER_URL=$REDIS_URL/0 export CELERY_BROKER_URL=$REDIS_URL/0
{% endif %} {% endif %}

View File

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