Files
1bis8/server/docker-compose.yml
T

72 lines
1.9 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.
# 1 bis 8 Party – Web-Stack auf hocks.eu
# Muster: Mieterportal-Stack (/opt/mieterportal + /opt/mp-mail)
# TLS + Subdomain liefert der Nginx Proxy Manager (npm_default-Netz).
#
# Dienste:
# onebis8-web nginx, statisches dist/ (Mobile-App), proxiet
# POST /api/mail/send → onebis8-mail-api (Token aus app.env)
# onebis8-mail Postfix-Relay (nur intern im Docker-Netz, kein -p)
# onebis8-mail-api schlanke Mail-HTTP-API mit Outbox/Retry (Muster: mp-mail-api)
#
# Konfiguration:
# app.env MAIL_API_TOKEN (Token für den nginx-Proxy, gitignored)
# mail/mail.env Relay, Absender, Token (gitignored)
services:
onebis8-web:
build: ./web
image: onebis8-web:latest
container_name: onebis8-web
restart: unless-stopped
volumes:
- ./web/docker/templates/default.conf.template:/etc/nginx/templates/default.conf.template:ro
# envsubst ersetzt ${MAIL_API_TOKEN} beim Start aus app.env
env_file:
- app.env
depends_on:
- onebis8-mail-api
networks:
- npm_default
# Postfix-Relay (nur intern)
onebis8-mail:
build: ./mail/postfix
image: onebis8-postfix:latest
container_name: onebis8-mail
restart: unless-stopped
env_file:
- mail/mail.env
expose:
- "25"
networks:
- npm_default
# Kleine HTTP-API, über die die Webseite Mails an den Relay übergibt.
onebis8-mail-api:
image: python:3.12-alpine
container_name: onebis8-mail-api
restart: unless-stopped
env_file:
- mail/mail.env
environment:
RELAY_HOST: onebis8-mail
RELAY_PORT: "25"
PORT: "8080"
ALLOWED_ORIGIN: https://1bis.hocks.eu
DATA_DIR: /data
command: ["python", "/app/server.py"]
volumes:
- ./mail/api/server.py:/app/server.py:ro
- onebis8-mail-data:/data
depends_on:
- onebis8-mail
networks:
- npm_default
networks:
npm_default:
external: true
volumes:
onebis8-mail-data: