Created
June 16, 2024 06:21
-
-
Save analogic/d88c56ba8c4fd843090cf5ec84f14be3 to your computer and use it in GitHub Desktop.
Poste.io and Traefik
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
traefik: | |
image: "traefik:v2.4" | |
restart: unless-stopped | |
container_name: "traefik" | |
networks: | |
default: | |
ipv4_address: 172.20.0.97 | |
ipv6_address: fc00:dead:beef::97 | |
zabbix_frontend: | |
zabbix_backend: | |
ports: | |
- "80:80" | |
- "443:443" | |
- "8080:8080" | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:[a-z-.]+}`)" | |
- "traefik.http.routers.http-catchall.entrypoints=web" | |
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https" | |
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" | |
volumes: | |
- "/data/traefik/traefik.yml:/etc/traefik/traefik.yml:ro" | |
- "/data/traefik/letsencrypt:/letsencrypt" | |
- "/var/run/docker.sock:/var/run/docker.sock:ro" | |
mailserver: | |
image: poste.io/mailserver:development | |
container_name: mailserver | |
restart: unless-stopped | |
hostname: mail.poste.io | |
networks: | |
default: | |
ipv4_address: 172.20.0.98 | |
ipv6_address: fc00:dead:beef::98 | |
zabbix: | |
ports: | |
- "25:25" | |
- "110:110" | |
- "143:143" | |
- "465:465" | |
- "587:587" | |
- "993:993" | |
- "995:995" | |
- "4190:4190" | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.routers.mailserver.rule=Host(`mail.poste.io`)" | |
- "traefik.http.routers.mailserver.tls.certresolver=le" | |
- "traefik.http.routers.mailserver.entrypoints=websecure" | |
- "traefik.http.routers.mailserver.middlewares=redirect-to-https" | |
- "traefik.http.services.mailserver.loadbalancer.server.port=80" | |
environment: | |
- HTTPS=OFF | |
- TZ=Europe/Prague | |
volumes: | |
- /data/mailserver:/data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
entrypoints: | |
web: | |
address: ":80" | |
websecure: | |
address: ":443" | |
api: | |
dashboard: true | |
insecure: true | |
providers: | |
docker: | |
exposedByDefault: false | |
file: | |
directory: "/etc/traefik/config" | |
certificatesResolvers: | |
le: | |
acme: | |
email: [email protected] | |
storage: /letsencrypt/acme.json | |
tlsChallenge: true | |
log: | |
level: DEBUG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment