mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-11 12:17:37 +03:00
15 lines
499 B
Bash
15 lines
499 B
Bash
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
# setting up environment variables to work with DATABASE_URL and DJANGO_CACHE_URL
|
||
|
export DJANGO_CACHE_URL=memcache://memcached:11211
|
||
|
|
||
|
if [ -z "$POSTGRES_ENV_POSTGRES_USER" ]; then
|
||
|
export POSTGRES_ENV_POSTGRES_USER=postgres
|
||
|
fi
|
||
|
|
||
|
export DATABASE_URL=postgres://$POSTGRES_ENV_POSTGRES_USER:$POSTGRES_ENV_POSTGRES_PASSWORD@postgres:5432/$POSTGRES_ENV_POSTGRES_USER
|
||
|
{% if cookiecutter.use_celery %}
|
||
|
export CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
|
||
|
{% endif %}
|
||
|
exec "$@"
|