mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
This includes running containers for mailman-core and mailman-web, both connecting to the same database used by the boost web site. The branch proposes a minor refactoring for the shared usage of the compose-start.sh script, allowing both the boost web server and the mailman-web server to wait for the db, run migrations, collect assets and run the django devserver.
93 lines
1.6 KiB
YAML
93 lines
1.6 KiB
YAML
version: "3.3"
|
|
|
|
services:
|
|
|
|
db:
|
|
image: postgres:12.0
|
|
env_file: .env
|
|
environment:
|
|
- "POSTGRES_HOST_AUTH_METHOD=trust"
|
|
networks:
|
|
- backend
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data/
|
|
ports:
|
|
- "$PGPORT:5432"
|
|
|
|
redis:
|
|
image: "redis:alpine"
|
|
networks:
|
|
- backend
|
|
volumes:
|
|
- redis_data:/data
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
command: [ "/bin/bash", "/code/docker/compose-start.sh" ]
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
- "LOCAL_DEVELOPMENT=true"
|
|
- "DOCKER_DIR=/code/docker"
|
|
- "PYTHON=python"
|
|
- "WEB_PORT=8000"
|
|
env_file:
|
|
- .env
|
|
init: true
|
|
networks:
|
|
- backend
|
|
- frontend
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- .:/code
|
|
- ../website2022/:/website
|
|
stop_signal: SIGKILL
|
|
|
|
mailman-core:
|
|
image: maxking/mailman-core
|
|
stop_grace_period: 30s
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- db
|
|
ports:
|
|
- "8001:8001" # API
|
|
- "8024:8024" # LMTP - incoming emails
|
|
volumes:
|
|
- ./mailman/core:/opt/mailman/
|
|
networks:
|
|
- backend
|
|
|
|
mailman-web:
|
|
image: maxking/mailman-web
|
|
entrypoint: /opt/mailman-docker/compose-start.sh
|
|
environment:
|
|
- "DOCKER_DIR=/opt/mailman-docker"
|
|
- "PYTHON=python3"
|
|
- "WEB_PORT=8008"
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- db
|
|
ports:
|
|
- "8008:8008" # HTTP
|
|
- "8080:8080" # uwsgi
|
|
volumes:
|
|
- ./mailman/web:/opt/mailman-web-data
|
|
- ./docker:/opt/mailman-docker
|
|
networks:
|
|
- backend
|
|
|
|
|
|
networks:
|
|
backend:
|
|
frontend:
|
|
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|