Files
OSIT-Mailman3/docker-compose.yaml
Abhilash Raj ed0756f9c9 Several changes
- Add hostnames to the container.
- Add a custom bridge network so that the containers and the host can have
  a static IP and that can be added in the configurations.
- Assign static IPs to all the containers in the new default configuration.
2017-04-05 00:11:33 -07:00

66 lines
1.4 KiB
YAML

version: '2'
services:
mailman-core:
build:
context: ./core
image: maxking/mailman-core:latest
container_name: mailman-core
hostname: mailman-core
volumes:
- /opt/mailman/core:/opt/mailman/
links:
- database:database
depends_on:
- database
environment:
- DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb
networks:
mailman:
ipv4_address: 172.19.199.2
mailman-web:
build:
context: ./web
image: maxking/mailman-web:latest
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:
- UWSGI_WSGI_FILE=wsgi.py
- UWSGI_HTTP=:8000
- UWSGI_WORKERS=2
- UWSGI_THREADS=4
- DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb
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
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