From 02b42a4982f2de3f942b988bc55813b748891eee Mon Sep 17 00:00:00 2001 From: Tomas Bures Date: Sun, 17 Feb 2019 13:56:15 +0000 Subject: [PATCH] Updated instructions to use docker image on docker hub. Addresses #521 --- README.md | 10 +++++----- docker-compose-local.yml | 41 ++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 2 +- 3 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 docker-compose-local.yml diff --git a/README.md b/README.md index 0cc70fac..878336c1 100644 --- a/README.md +++ b/README.md @@ -180,14 +180,12 @@ To deploy Mailtrain with Docker, you need the following three dependencies insta These are the steps to start Mailtrain via docker-compose: -1. Download Mailtrain using git +1. Download Mailtrain's docker-compose build file ``` - git clone https://github.com/Mailtrain-org/mailtrain.git - cd mailtrain - git checkout development + curl -O https://raw.githubusercontent.com/Mailtrain-org/mailtrain/master/docker-compose.yml ``` -2. Deploy Mailtrain via docker-compose (in the root directory of the Mailtrain project). This will take quite some time when run for the first time. Subsequent executions will be fast. +2. Deploy Mailtrain via docker-compose (in the directory to which you downloaded the `docker-compose.yml` file). This will take quite some time when run for the first time. Subsequent executions will be fast. ``` docker-compose up ``` @@ -201,6 +199,8 @@ These are the steps to start Mailtrain via docker-compose: 4. Authenticate as `admin`:`test` +The instructions above use an automatically built Docker image on DockerHub (https://hub.docker.com/r/mailtrain/mailtrain). If you want to build the Docker image yourself (e.g. when doing development), use the `docker-compose-local-build.yml` located in the project's root directory. + ## License diff --git a/docker-compose-local.yml b/docker-compose-local.yml new file mode 100644 index 00000000..ce2ba6e8 --- /dev/null +++ b/docker-compose-local.yml @@ -0,0 +1,41 @@ +version: '3' + +services: + mysql: + image: mariadb:10.4 + environment: + - MYSQL_ROOT_PASSWORD=mailtrain + - MYSQL_DATABASE=mailtrain + - MYSQL_USER=mailtrain + - MYSQL_PASSWORD=mailtrain + volumes: + - mysql-data:/var/lib/mysql + + redis: + image: redis:5 + volumes: + - redis-data:/data + + mongo: + image: mongo:4-xenial + volumes: + - mongo-data:/data/db + + mailtrain: + build: . + command: ${MAILTRAIN_SETTINGS} + ports: + - "3000:3000" + - "3003:3003" + - "3004:3004" + volumes: + - mailtrain-files:/app/server/files + - mailtrain-reports:/app/protected/reports + +volumes: + mysql-data: + redis-data: + mongo-data: + mailtrain-files: + mailtrain-reports: + diff --git a/docker-compose.yml b/docker-compose.yml index ce2ba6e8..61055326 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,7 @@ services: - mongo-data:/data/db mailtrain: - build: . + image: mailtrain/mailtrain:latest command: ${MAILTRAIN_SETTINGS} ports: - "3000:3000"