mirror of https://github.com/snachodog/mybuddy.git
Update Docker deployment documentation (#106)
This commit is contained in:
parent
a0a6c88a19
commit
5c8fc91538
|
@ -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
|
||||||
|
|
28
README.md
28
README.md
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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: {}
|
Loading…
Reference in New Issue