Figure out how to not make the DOMAIN variable mandatory #24

Closed
opened 2021-06-10 11:33:22 +00:00 by decentral1se · 1 comment
Owner

Because 661bec4727/compose.yml (L42), traefik will always try to generate a certificate for the $DOMAIN but when you don't have the dashboard enabled then you don't need that certificate!

To get it to deploy without a domain, I had to:

diff --git a/compose.yml b/compose.yml
index 365843f..32e8d76 100644
--- a/compose.yml
+++ b/compose.yml
@@ -39,12 +39,8 @@ services:
       labels:
         - "traefik.enable=true"
         - "traefik.http.services.traefik.loadbalancer.server.port=web"
-        - "traefik.http.routers.traefik.rule=Host(`${DOMAIN}`)"
         - "traefik.http.routers.traefik.entrypoints=web-secure"
-        - "traefik.http.routers.traefik.tls.certresolver=${LETS_ENCRYPT_ENV}"
-        - "traefik.http.routers.traefik.tls.options=default@file"
         - "traefik.http.routers.traefik.service=api@internal"
-        - "traefik.http.routers.traefik.middlewares=security@file"
         - coop-cloud.${STACK_NAME}.app.version=v2.4.8-d7d63b0d
 networks:
   proxy:
Because https://git.autonomic.zone/coop-cloud/traefik/src/commit/661bec4727df0076a2a538d29b7158c0266ff482/compose.yml#L42, traefik will always try to generate a certificate for the `$DOMAIN` but when you don't have the dashboard enabled then you don't need that certificate! To get it to deploy without a domain, I had to: ```diff diff --git a/compose.yml b/compose.yml index 365843f..32e8d76 100644 --- a/compose.yml +++ b/compose.yml @@ -39,12 +39,8 @@ services: labels: - "traefik.enable=true" - "traefik.http.services.traefik.loadbalancer.server.port=web" - - "traefik.http.routers.traefik.rule=Host(`${DOMAIN}`)" - "traefik.http.routers.traefik.entrypoints=web-secure" - - "traefik.http.routers.traefik.tls.certresolver=${LETS_ENCRYPT_ENV}" - - "traefik.http.routers.traefik.tls.options=default@file" - "traefik.http.routers.traefik.service=api@internal" - - "traefik.http.routers.traefik.middlewares=security@file" - coop-cloud.${STACK_NAME}.app.version=v2.4.8-d7d63b0d networks: proxy: ```
Author
Owner

This is living on 3121c79c07 for now which you can git fetch -a and then deploy --chaos with. A proper fix coming One Day TM.

This is living on https://git.autonomic.zone/coop-cloud/traefik/commit/3121c79c074ce726349938fe3d30e5d4968a11b3 for now which you can `git fetch -a` and then `deploy --chaos` with. A proper fix coming One Day TM.
This repo is archived. You cannot comment on issues.
No Label
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/traefik#24
No description provided.