Add Traefik labels

This commit is contained in:
2025-02-02 09:29:01 +02:00
parent 213de5466d
commit f8c826a07b
2 changed files with 32 additions and 16 deletions

View File

@@ -12,18 +12,22 @@ services:
restart: ${GOTIFY_RESTART_POLICY}
security_opt:
- no-new-privileges:true
ports:
- ${GOTIFY_PORT:-8080}:80
# environment:
# - GOTIFY_DEFAULTUSER_PASS=custom
# - GOTIFY_DATABASE_DIALECT=mysql
# - GOTIFY_DATABASE_CONNECTION=gotify:ubKrbI1NNn)/ryKT@tcp(mariadb:3306)/gotify?charset=utf8&parseTime=True&loc=Local
# - GOTIFY_PLUGINSDIR=data/plugins
# ports:
# - ${GOTIFY_PORT:-8080}:80
env_file:
- path: ./gotify.env
volumes:
- ${DOCKERDIR}/gotify/gotify_data:/app/data
- ${DOCKERDIR}/gotify/data:/app/data
networks:
- proxy
# - notification
# - database
labels:
traefik.enable: true
## HTTP Routers
traefik.http.routers.${GOTIFY_HOST_NAME}-rtr.entrypoints: https
traefik.http.routers.${GOTIFY_HOST_NAME}-rtr.rule: Host(`${GOTIFY_HOST_NAME}.$DOMAINNAME1`)
## Middlewares
#traefik.http.routers.${GOTIFY_HOST_NAME}-rtr.middlewares: chain-authelia@file
traefik.http.routers.${GOTIFY_HOST_NAME}-rtr.middlewares: chain-no-auth@file
## HTTP Services
traefik.http.routers.${GOTIFY_HOST_NAME}-rtr.service: ${GOTIFY_HOST_NAME}-svc
traefik.http.services.${GOTIFY_HOST_NAME}-svc.loadbalancer.server.port: 80

View File

@@ -3,13 +3,25 @@ services:
image: ${MAILRISE_IMAGE}:${MAILRISE_TAG}
container_name: ${MAILRISE_CONTAINER_NAME}
restart: ${MAILRISE_RESTART_POLICY}
command: -vv /etc/mailrise.conf
security_opt:
- no-new-privileges:true
ports:
- ${MAILRISE_PORT:-8025}:8025
# ports:
# - ${MAILRISE_PORT:-8025}:8025
volumes:
- ${DOCKERDIR}/mailrise/mailrise.conf:/etc/mailrise.conf
- ${DOCKERDIR}/mailrise/certs/cert.pem:/etc/ssl/cert.pem
- ${DOCKERDIR}/mailrise/certs/key.pem:/etc/ssl/key.pem
- ${DOCKERDIR}/mailrise/mailrise.conf:/etc/mailrise.conf:ro
# - ${DOCKERDIR}/mailrise/certs/cert.pem:/etc/ssl/cert.pem
# - ${DOCKERDIR}/mailrise/certs/key.pem:/etc/ssl/key.pem
networks:
- proxy
- proxy
labels:
traefik.enable: true
traefik.tcp.routers.mailrise.rule: HostSNI(`*`)
traefik.tcp.routers.mailrise.tls: true
traefik.tcp.routers.mailrise.tls.certresolver: ${CERTRESOLVER}
#traefik.tcp.routers.mailrise.tls.options: tls-opts@file
traefik.tcp.routers.mailrise.tls.passthrough: true
traefik.tcp.routers.mailrise.tls.domains[0].main: mailrise.lab.gurulandia.eu
traefik.tcp.routers.mailrise.tls.domains[0].sans: ""
traefik.tcp.routers.mailrise.entrypoints: mailsecure,maildefault
traefik.docker.network: proxy