From b7b44e6ff6b8675b9df595af45d51eea6b18ed98 Mon Sep 17 00:00:00 2001 From: Yi EungJun Date: Thu, 7 Apr 2016 17:34:10 +0900 Subject: [PATCH] Support installation without SSL certificate Now users should create a symbolic link to docker-compose-ssl.yml if they want to enable SSL or docker-compose-nossl.yml if not. Rewrite README to describe this rule. This fixes https://github.com/mattermost/mattermost-docker/issues/5. --- README.md | 47 +++++++++++++++----- docker-compose-nossl.yml | 15 +++++++ docker-compose.yml => docker-compose-ssl.yml | 0 3 files changed, 50 insertions(+), 12 deletions(-) create mode 100644 docker-compose-nossl.yml rename docker-compose.yml => docker-compose-ssl.yml (100%) diff --git a/README.md b/README.md index 1d89a84..5fa1326 100644 --- a/README.md +++ b/README.md @@ -5,32 +5,55 @@ Dockerfiles for Mattermost in production * [docker] * [docker-compose] -## Howto +## Installation -### Install SSL certificate +### Install with SSL certificate -You must install SSL certificate before starting. Put your SSL certificate as -`web/cert/cert.pem` and the private key that has no password as -`web/cert/private/key-no-password.pem`. +1. Create a symbolic link `docker-compose.yml` to `docker-compose-ssl.yml`: -If you don't have them you can generate a self-signed SSL certificate. + ln -s docker-compose-ssl.yml docker-compose.yml -### (Re)start +2. Put your SSL certificate as `web/cert/cert.pem` and the private key that has + no password as `web/cert/private/key-no-password.pem`. If you don't have + them you may generate a self-signed SSL certificate. -1. Run `docker-compose up -d`. -2. Open `https://your.domain` with your web browser. +3. Build and run mattermost + + docker-compose up -d + +4. Open `https://your.domain` with your web browser. + +### Install without SSL certificate + +1. Create a symbolic link `docker-compose.yml` to `docker-compose-nossl.yml`: + + ln -s docker-compose-nossl.yml docker-compose.yml + +2. Build and run mattermost + + docker-compose up -d + +3. Open `http://your.domain` with your web browser. + +## Starting/Stopping + +### Start + + docker-compose start ### Stop -Run `docker-compose stop`. + docker-compose stop + +## Removing ### Remove the containers -Run `docker-compose stop && docker-compose rm`. + docker-compose stop && docker-compose rm ### Remove the data and settings of your mattermost instance -Remove `volumes` directory + sudo rm -rf volumes ## Known Issues diff --git a/docker-compose-nossl.yml b/docker-compose-nossl.yml new file mode 100644 index 0000000..77f7b54 --- /dev/null +++ b/docker-compose-nossl.yml @@ -0,0 +1,15 @@ +db: + build: db + volumes: + - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data + - /etc/localtime:/etc/localtime:ro +app: + build: app + links: + - db:db + ports: + - "80:80" + volumes: + - ./volumes/app/mattermost/config:/mattermost/config:rw + - ./volumes/app/mattermost/data:/mattermost/data:rw + - /etc/localtime:/etc/localtime:ro diff --git a/docker-compose.yml b/docker-compose-ssl.yml similarity index 100% rename from docker-compose.yml rename to docker-compose-ssl.yml