2019-10-04 09:21:53 +00:00
|
|
|
version: "3.7"
|
2017-11-24 14:09:43 +00:00
|
|
|
services:
|
|
|
|
db:
|
2020-04-18 16:28:51 +00:00
|
|
|
image: postgres:11 # pin postgres to a major version
|
2018-06-13 13:07:36 +00:00
|
|
|
environment:
|
2019-10-04 08:50:41 +00:00
|
|
|
- PGDATA=/db-data
|
2020-04-18 16:28:51 +00:00
|
|
|
- POSTGRES_PASSWORD=postgres # has to correspond with POSTGRES_PASSWORD in APP
|
2018-06-13 13:07:36 +00:00
|
|
|
volumes:
|
2019-10-04 09:46:02 +00:00
|
|
|
- db:/db-data:rw
|
2017-11-26 19:02:57 +00:00
|
|
|
app:
|
2020-02-07 19:55:36 +00:00
|
|
|
image: babybuddy/babybuddy
|
2020-02-04 19:30:19 +00:00
|
|
|
# See README.md#configuration for other environment configuration options.
|
|
|
|
environment:
|
2020-04-18 16:30:35 +00:00
|
|
|
- ALLOWED_HOSTS=
|
2020-02-04 19:30:19 +00:00
|
|
|
- DJANGO_SETTINGS_MODULE=babybuddy.settings.docker
|
2020-04-18 16:30:35 +00:00
|
|
|
- SECRET_KEY=
|
|
|
|
- TIME_ZONE=
|
2020-04-18 16:28:51 +00:00
|
|
|
- POSTGRES_PASSWORD=postgres
|
|
|
|
- DEBUG=False # Turn to False in production
|
2020-02-09 04:22:36 +00:00
|
|
|
volumes:
|
|
|
|
- media:/app/media:rw
|
2020-04-18 16:28:51 +00:00
|
|
|
# Sleep 5 seconds to allow the db to to come up;
|
2020-04-22 06:47:53 +00:00
|
|
|
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:
|
2018-06-13 13:07:36 +00:00
|
|
|
- db
|
|
|
|
volumes:
|
2019-10-04 09:46:02 +00:00
|
|
|
db: {}
|
2020-02-09 04:22:36 +00:00
|
|
|
media: {}
|