From f8c826a07b2243305a5f03742ae460fc9aaeb20f Mon Sep 17 00:00:00 2001 From: Gurulandia Date: Sun, 2 Feb 2025 09:29:01 +0200 Subject: [PATCH] Add Traefik labels --- docker/compose/dc-gotify.yml | 24 ++++++++++++++---------- docker/compose/dc-mailrise.yml | 24 ++++++++++++++++++------ 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/docker/compose/dc-gotify.yml b/docker/compose/dc-gotify.yml index c8877c0..4d7978e 100644 --- a/docker/compose/dc-gotify.yml +++ b/docker/compose/dc-gotify.yml @@ -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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/docker/compose/dc-mailrise.yml b/docker/compose/dc-mailrise.yml index 47173e0..0cb50c0 100644 --- a/docker/compose/dc-mailrise.yml +++ b/docker/compose/dc-mailrise.yml @@ -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 \ No newline at end of file + - 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 \ No newline at end of file