Even though the 'master.lck' is supposed to prevent race conditions, it needs to be manually removed if the container did not shutdown gracefully. Remove the manual check for the lock file and force mailman to remove it. Also, set the stop_grace_period to 30s, which would allow Core to stop gracefully and not leave the lock file over. Default value in case of Docker is 10s.
64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
version: '2'
|
|
|
|
services:
|
|
mailman-core:
|
|
image: maxking/mailman-core:0.1
|
|
container_name: mailman-core
|
|
hostname: mailman-core
|
|
volumes:
|
|
- /opt/mailman/core:/opt/mailman/
|
|
stop_grace_period: 30s
|
|
links:
|
|
- database:database
|
|
depends_on:
|
|
- database
|
|
environment:
|
|
- DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb
|
|
- DATABASE_TYPE=postgres
|
|
- DATABASE_CLASS=mailman.database.postgresql.PostgreSQLDatabase
|
|
- HYPERKITTY_API_KEY=someapikey
|
|
networks:
|
|
mailman:
|
|
ipv4_address: 172.19.199.2
|
|
|
|
mailman-web:
|
|
image: maxking/mailman-web:0.1
|
|
container_name: mailman-web
|
|
hostname: mailman-web
|
|
depends_on:
|
|
- database
|
|
links:
|
|
- mailman-core:mailman-core
|
|
- database:database
|
|
volumes:
|
|
- /opt/mailman/web:/opt/mailman-web-data
|
|
environment:
|
|
- DATABASE_TYPE=postgres
|
|
- DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb
|
|
- HYPERKITTY_API_KEY=someapikey
|
|
networks:
|
|
mailman:
|
|
ipv4_address: 172.19.199.3
|
|
|
|
database:
|
|
environment:
|
|
POSTGRES_DB: mailmandb
|
|
POSTGRES_USER: mailman
|
|
POSTGRES_PASSWORD: mailmanpass
|
|
restart: always
|
|
image: postgres:9.6-alpine
|
|
volumes:
|
|
- /opt/mailman/database:/var/lib/postgresql/data
|
|
networks:
|
|
mailman:
|
|
ipv4_address: 172.19.199.4
|
|
|
|
networks:
|
|
mailman:
|
|
driver: bridge
|
|
ipam:
|
|
driver: default
|
|
config:
|
|
-
|
|
subnet: 172.19.199.0/24
|