Update Docker deployment documentation (#106)

This commit is contained in:
Christopher C. Wells 2020-02-02 14:14:27 -08:00
parent a0a6c88a19
commit 5c8fc91538
3 changed files with 22 additions and 15 deletions

3
.gitignore vendored
View File

@ -7,7 +7,10 @@
# Environment files. # Environment files.
.env .env
# Docker deployment files.
docker.env docker.env
docker-compose.yml
# IDE configuration files. # IDE configuration files.
/.idea /.idea

View File

@ -61,7 +61,10 @@ for detailed information.
cd babybuddy cd babybuddy
1. Set the `SECRET_KEY` and `TIME_ZONE` values in `.ebextensions/babybuddy.config` 1. Set (at least) the `SECRET_KEY` environment value in `.ebextensions/babybuddy.config`
*See [Configuration](#configuration) for other settings that can be
controlled by environment variables.
1. [Create an IAM user](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html) in AWS with EB, EC2, RDS and S3 privileges. 1. [Create an IAM user](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html) in AWS with EB, EC2, RDS and S3 privileges.
@ -78,18 +81,25 @@ redeploy the app (e.g. if there are errors or settings are changed).
### Docker ### Docker
A Docker deployment requires [Docker](https://www.docker.com/) and A Docker deployment requires [Docker Engine](https://www.docker.com/) v18.06.0+
[Docker Compose](https://docs.docker.com/compose/) to create two containers - and [Docker Compose](https://docs.docker.com/compose/) v1.22.0+ to create two
one for the database and one for the application. containers: one for the database and one for the application. This process ues
two files, `docker.env` and `docker-compose.yml` to set up the application from
the [cdubzzz/babybuddy](https://hub.docker.com/r/cdubzzz/babybuddy) image on
Docker Hub.
1. Copy the `docker.env.example` to `docker.env` and set the `ALLOWED_HOSTS` and The example files provided in this repository (`docker.env.example` and
`SECRET_KEY` variables `docker-compose.example.yml`) are intended for production deployments. Those two
files are all that is needed for a Docker deployment of Baby Buddy.
cp docker.env.example docker.env 1. Copy the contents of `docker.env.example` as `docker.env` and set the
editor docker.env `ALLOWED_HOSTS` and `SECRET_KEY` variables (at least).
*See [Configuration](#configuration) for other settings that can be *See [Configuration](#configuration) for other settings that can be
controlled by environment variables added to the `docker.env` file.* controlled by environment variables.*
1. Copy the contents of `docker-compose.example.yml` as `docker-compose.yml` in
the same directory as the `docker.env` file from step 1.
1. Build/run the application 1. Build/run the application

View File

@ -1,6 +1,4 @@
---
version: "3.7" version: "3.7"
services: services:
db: db:
image: postgres image: postgres
@ -17,9 +15,5 @@ services:
- "8000:8000" - "8000:8000"
depends_on: depends_on:
- db - db
volumes:
- app:/app:rw
volumes: volumes:
app: {}
db: {} db: {}