mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-10 19:57:09 +03:00
move from links to depends_on
This commit is contained in:
parent
1d7fd94ab1
commit
982b21d61b
|
@ -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 %}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user