From 172ef58fcff818cf272d7853337b5a1732450768 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Sun, 21 Jun 2020 08:20:40 -0700 Subject: [PATCH] Add example Docker Compose file for SQLite-based deployment (#145) --- README.md | 3 +++ docker-compose.example.sqlite.yml | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 docker-compose.example.sqlite.yml diff --git a/README.md b/README.md index 31c5470a..8f23336c 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,9 @@ The app should now be locally available at [Docker's "Get Started" documentation](https://docs.docker.com/get-started/) for detailed information about deployment methods with Docker. +A secondary example file `docker-compose.example.sqlite.yml` is also available +for a simpler SQLite-based deployment (the default example users PostgreSQL). + ### Heroku [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) diff --git a/docker-compose.example.sqlite.yml b/docker-compose.example.sqlite.yml new file mode 100644 index 00000000..6bd664ad --- /dev/null +++ b/docker-compose.example.sqlite.yml @@ -0,0 +1,21 @@ +version: "3.7" +services: + app: + image: babybuddy/babybuddy + # See README.md#configuration for other environment configuration options. + environment: + - ALLOWED_HOSTS= + - DJANGO_SETTINGS_MODULE=babybuddy.settings.base + - SECRET_KEY= + - TIME_ZONE= + - POSTGRES_PASSWORD=postgres + - DEBUG=False # Turn to False in production + volumes: + - data:/app/data:rw + - media:/app/media:rw + command: bash -c 'python manage.py migrate --noinput && python manage.py createcachetable && gunicorn babybuddy.wsgi -b :8000 --log-level=info' + ports: + - "8000:8000" +volumes: + data: {} + media: {}