Files
OSIT-Mailman3/docker-compose.yaml
Abhilash Raj 131d1c0b8a Add a postgres database container.
- Set environemnt variables for Postgresql database in the compose file
- Set environment variables for uwsgi in the compose file
- Check if the postgresql container is up and accepting connections before
  running any actual services.
2017-03-29 21:58:40 -07:00

48 lines
1.0 KiB
YAML

version: '2'
services:
mailman-core:
build:
context: ./core
image: maxking/mailman-core:latest
container_name: mailman-core
volumes:
- /opt/mailman/core:/opt/mailman/
links:
- database:database
depends_on:
- database
environment:
- DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb
mailman-web:
build:
context: ./web
image: maxking/mailman-web:latest
container_name: mailman-web
ports:
- "8000:8000"
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
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