Files
Mieterportal/mail-server/docker-compose.yml
T

54 lines
1.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Hocks Mieterportal – Mail-Stack (Muster aus dem Schulportal-Projekt)
#
# Postfix-Relay: nimmt Mails intern entgegen und liefert sie über den
# konfigurierten Relayhost aus. Port 25 wird NICHT nach außen veröffentlicht –
# nur im Docker-Netz (npm_default, erreichbar für den NPM-Proxy).
#
# Start: cd mail-server && cp mail.env.example mail.env # Werte befüllen
# docker compose up -d --build
services:
# Postfix-Relay (nur intern)
mp-mail:
build: ./postfix
image: mp-postfix:latest
container_name: mp-mail
restart: unless-stopped
env_file: mail.env
environment:
# Direktzustellung wie Schulportal, z. B.:
# RELAY_HOST: "[<mx-von-hocks.eu>]:25"
RELAY_HOST: "${RELAY_HOST:-}"
expose:
- "25"
networks:
- npm_default
# Kleine HTTP-API, über die das Portal Mails an den Relay übergibt.
mp-mail-api:
image: python:3.12-alpine
container_name: mp-mail-api
restart: unless-stopped
env_file: mail.env
environment:
RELAY_HOST: mp-mail
RELAY_PORT: "25"
PORT: "8080"
ALLOWED_ORIGIN: https://mieterportal.hocks.eu
DATA_DIR: /data
command: ["python", "/app/server.py"]
volumes:
- ./api/server.py:/app/server.py:ro
- mp-mail-data:/data
depends_on:
- mp-mail
networks:
- npm_default
volumes:
mp-mail-data:
networks:
npm_default:
external: true