mybuddy/docker-compose.example.yml

31 lines
929 B
YAML
Raw Normal View History

version: "3.7"
2017-11-24 14:09:43 +00:00
services:
db:
image: postgres:11 # pin postgres to a major version
environment:
- PGDATA=/db-data
- POSTGRES_PASSWORD=postgres # has to correspond with POSTGRES_PASSWORD in APP
volumes:
2019-10-04 09:46:02 +00:00
- db:/db-data:rw
app:
2020-02-07 19:55:36 +00:00
image: babybuddy/babybuddy
# See README.md#configuration for other environment configuration options.
environment:
- ALLOWED_HOSTS=
- DJANGO_SETTINGS_MODULE=babybuddy.settings.docker
- SECRET_KEY=
- TIME_ZONE=
- POSTGRES_PASSWORD=postgres
- DEBUG=False # Turn to False in production
volumes:
- media:/app/media:rw
# Sleep 5 seconds to allow the db to to come up;
command: bash -c 'sleep 5 && python manage.py migrate --noinput && python manage.py createcachetable && gunicorn babybuddy.wsgi -b :8000 --log-level=info'
2017-11-24 14:09:43 +00:00
ports:
- "8000:8000"
depends_on:
- db
volumes:
2019-10-04 09:46:02 +00:00
db: {}
media: {}