-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revise Traefik configuration for improved security Commented out insecure API settings and employed HTTP challenge for certificate resolution using Let's Encrypt. Updated entry point names for clarity and reorganized volume mappings for better structure. Introduced a new 'whoami' service as a simple demonstration app. Ensured API exposure defaults to false to avoid unintended access issues. ```
- Loading branch information
Showing
4 changed files
with
98 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,63 @@ | ||
api: | ||
dashboard: true | ||
insecure: true | ||
debug: true | ||
#api: | ||
# dashboard: true | ||
# insecure: true | ||
# debug: true | ||
entryPoints: | ||
http: | ||
web: | ||
address: ":80" | ||
http: | ||
redirections: | ||
entryPoint: | ||
to: https | ||
scheme: https | ||
https: | ||
|
||
websecure: | ||
address: ":443" | ||
serversTransport: | ||
insecureSkipVerify: true | ||
providers: | ||
docker: | ||
endpoint: "unix:///var/run/docker.sock" | ||
exposedByDefault: false | ||
# file: | ||
# filename: /config.yml | ||
|
||
certificatesResolvers: | ||
cloudflare: | ||
myresolver: | ||
acme: | ||
email: "${CLOUDFLARE_EMAIL}" | ||
storage: acme.json | ||
email: "${EMAIL}" | ||
storage: /letsencrypt/acme.json | ||
httpChallenge: | ||
# used during the challenge | ||
entryPoint: web | ||
|
||
http: | ||
routers: | ||
blog: | ||
rule: "Host(`home.youngsecurity.net`) && Path(`/`)" | ||
tls: | ||
certResolver: myresolver | ||
#entryPoints: | ||
# web: | ||
# address: ":80" | ||
# http: | ||
# redirections: | ||
# entryPoint: | ||
# to: websecure | ||
# scheme: https | ||
# websecure: | ||
# address: ":443" | ||
#serversTransport: | ||
# insecureSkipVerify: true | ||
#providers: | ||
# docker: | ||
# endpoint: "unix:///var/run/docker.sock" | ||
# exposedByDefault: false | ||
# file: | ||
# filename: /config.yml | ||
#certificatesResolvers: | ||
# youngsecurity: | ||
# acme: | ||
# email: "${EMAIL}" | ||
# storage: /letsencrypt/acme.json | ||
|
||
# cloudflare: | ||
# acme: | ||
# email: "${CLOUDFLARE_EMAIL}" | ||
# storage: /letsencrypt/acme.json | ||
# caServer: https://acme-v02.api.letsencrypt.org/directory # prod (default) | ||
caServer: https://acme-staging-v02.api.letsencrypt.org/directory # staging | ||
dnsChallenge: | ||
provider: ${DNS_CHALLENGE_PROVIDER} | ||
#disablePropagationCheck: true # uncomment this if you have issues pulling certificates through cloudflare, By setting this flag to true disables the need to wait for the propagation of the TXT record to all authoritative name servers. | ||
# caServer: https://acme-staging-v02.api.letsencrypt.org/directory # staging | ||
# dnsChallenge: | ||
# provider: ${DNS_CHALLENGE_PROVIDER} | ||
# disablePropagationCheck: true # uncomment this if you have issues pulling certificates through cloudflare, By setting this flag to true disables the need to wait for the propagation of the TXT record to all authoritative name servers. | ||
#delayBeforeCheck: 60s # uncomment along with disablePropagationCheck if needed to ensure the TXT record is ready before verification is attempted | ||
resolvers: | ||
- "${DNS_CHALLENGE_RESOLVERS_0}" | ||
- "${DNS_CHALLENGE_RESOLVERS_1}" | ||
# resolvers: | ||
# - "${DNS_CHALLENGE_RESOLVERS_0}" | ||
# - "${DNS_CHALLENGE_RESOLVERS_1}" |
This file contains 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