Add restart: always (#550)

* Update docker-compose.yml.dist
* Update docker-compose.elk.yml.dist
* Update README.md
This commit is contained in:
strarsis 2017-03-16 16:45:47 +01:00 committed by Thomas VIAL
parent 62c20295f9
commit 393f47d085
3 changed files with 5 additions and 0 deletions

View file

@ -42,6 +42,8 @@ Adapt this file with your FQDN. Install [docker-compose](https://docs.docker.com
Your configs must be mounted in `/tmp/docker-mailserver/`. To understand how things work on boot, please have a look to [start-mailserver.sh](https://github.com/tomav/docker-mailserver/blob/master/target/start-mailserver.sh) Your configs must be mounted in `/tmp/docker-mailserver/`. To understand how things work on boot, please have a look to [start-mailserver.sh](https://github.com/tomav/docker-mailserver/blob/master/target/start-mailserver.sh)
`restart: always` ensures that the mail server container (and ELK container when using the mail server together with ELK stack) is automatically restarted by Docker in cases like a Docker service or host restart or container exit.
```yaml ```yaml
version: '2' version: '2'

View file

@ -21,6 +21,7 @@ services:
- ENABLE_ELK_FORWARDER=1 - ENABLE_ELK_FORWARDER=1
cap_add: cap_add:
- NET_ADMIN - NET_ADMIN
restart: always
elk: elk:
build: elk build: elk
ports: ports:
@ -28,6 +29,7 @@ services:
- "9200:9200" - "9200:9200"
- "5044:5044" - "5044:5044"
- "5000:5000" - "5000:5000"
restart: always
volumes: volumes:
maildata: maildata:

View file

@ -23,6 +23,7 @@ services:
- DMS_DEBUG=0 - DMS_DEBUG=0
cap_add: cap_add:
- NET_ADMIN - NET_ADMIN
restart: always
volumes: volumes:
maildata: maildata: