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.
This commit is contained in:
Yi EungJun 2016-04-07 17:34:10 +09:00
parent 6918117793
commit b7b44e6ff6
3 changed files with 50 additions and 12 deletions

View File

@ -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

15
docker-compose-nossl.yml Normal file
View File

@ -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