Skip to content

Commit 9cf0596

Browse files
authored
Merge pull request #2 from peb-adr/traefik
Add missing certResolver field
2 parents 2370bbc + d47b82a commit 9cf0596

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG CONTEXT=prod
22

3-
FROM traefik:3.6.0 as base
3+
FROM traefik:3.6.0 AS base
44

55
## Setup
66
ARG CONTEXT

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The proxy service is configured through:
2828
- `TRAEFIK_LOG_LEVEL` - Log level (default: INFO, DEBUG in dev image)
2929
- `ENABLE_DASHBOARD` - Enable traefik web-based dashboard, also sets `debug: true` for now
3030
- `ENABLE_LOCAL_HTTPS` - Enable TLS using certs provided through `HTTPS_*_FILE`. Can be self-signed (used in dev by default) or manually generated/trusted.
31-
- `ENABLE_AUTO_HTTPS` - Enable cert retrieval through ACME. Depends on further variables.
31+
- `ENABLE_AUTO_HTTPS` - Enable cert retrieval through ACME. Depends on further variables. (Overruled by `ENABLE_LOCAL_HTTPS` if both are set)
3232
- `EXTERNAL_ADDRESS` - domain for which to retrieve cert
3333
- `ACME_ENDPOINT` - when unset will fallback to traefiks default value for `acme.caServer: https://acme-v02.api.letsencrypt.org/directory`
3434
- `ACME_EMAIL` - Email Address sent to acme endpoint during cert retrieval

entrypoint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ elif [ -n "$ENABLE_AUTO_HTTPS" ]; then
7979
tls:
8080
domains:
8181
- main: ${EXTERNAL_ADDRESS}
82+
certResolver: acmeResolver
8283
EOF
8384
# Additionally a plain HTTP endpoint to answer ACME challenges on must be
8485
# configured
85-
echo "Configuring traefik to answer acme challenges on port 8001."
8686
cat >> "$TRAEFIK_CONFIG" << 'EOF'
8787
8888
acme:
@@ -105,6 +105,10 @@ EOF
105105
caServer: ${ACME_ENDPOINT}
106106
EOF
107107
fi
108+
109+
echo "traefik was configured to automatically retrieve a TLS certificates via acme."
110+
echo "Make sure incoming challange requests (to HOST:80/.well-known/acme-challenge/) reach this container on port 8001"
111+
echo "In most cases forwarding the hosts port 80 to containers port 8001 is enough."
108112
fi
109113

110114

0 commit comments

Comments
 (0)