Docker support for production use

This commit adds a Docker infrastructure that is ready for production
use. It is meant to simplify the deployment of OSEM for everyone who
wants to host their own instances.

It includes many features like data persistence, automatic secret key
generation and persistence and automatic database initialization and
upgrading. This should make updating the Docker container as easy as
possible.
This commit is contained in:
TheAssassin 2017-03-25 22:51:21 +01:00
parent 4a026c9dde
commit 977769c255
6 changed files with 167 additions and 0 deletions

View file

@ -0,0 +1,29 @@
version: "2"
services:
database:
image: mariadb:10.1
env_file: docker-compose.env
volumes:
- database:/var/lib/mysql
mailhog:
image: mailhog/mailhog:latest
ports:
- "127.0.0.1:8025:8025"
web:
build: .
env_file: docker-compose.env
depends_on:
- database
- mailhog
ports:
- "127.0.0.1:9292:9292"
volumes:
- "web:/data"
# these named volumes are used to persist data
volumes:
database:
web: