From cb6f270b421f337b04356ac089a81387823796b8 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Mon, 21 Apr 2025 00:00:14 -0600 Subject: [PATCH] Update Servers/Containerization/Docker/Compose/Traefik.md --- Servers/Containerization/Docker/Compose/Traefik.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Servers/Containerization/Docker/Compose/Traefik.md b/Servers/Containerization/Docker/Compose/Traefik.md index 64fb4b2..b9bcc23 100644 --- a/Servers/Containerization/Docker/Compose/Traefik.md +++ b/Servers/Containerization/Docker/Compose/Traefik.md @@ -29,7 +29,7 @@ - Lastly, you need to ensure that port 80 on your firewall is opened to the IP of the Traefik Reverse Proxy to allow Let's Encrypt to do TLS-based challenges. ### Stack Deployment Information -```jsx title="docker-compose.yml" +```yaml title="docker-compose.yml" version: "3.3" services: traefik: @@ -103,7 +103,7 @@ networks: ``` -```jsx title=".env" +```yaml title=".env" CF_API_EMAIL=nicole.rappe@bunny-lab.io CF_API_KEY=REDACTED-CLOUDFLARE-DOMAIN-API-KEY LETSENCRYPT_EMAIL=nicole.rappe@bunny-lab.io @@ -118,7 +118,7 @@ Traefik operates in two ways, the first is labels, while the second are dynamic ### Docker-Compose Labels The first is that it reads "labels" from the docker-compose file of any deployed containers on the same host as Traefik. These labels typically look something like the following: -```jsx title="docker-compose.yml" +```yaml title="docker-compose.yml" labels: - "traefik.enable=true" - "traefik.http.routers.gitea.rule=Host(`example.bunny-lab.io`)" @@ -134,7 +134,7 @@ Dynamic configuration files exist under the Traefik container located at `/etc/t An example of a dynamic configuration file would look something like this: -```jsx title="/etc/traefik/dynamic/example.bunny-lab.io.yml" +```yaml title="/etc/traefik/dynamic/example.bunny-lab.io.yml" http: routers: example: @@ -161,7 +161,7 @@ You can see the similarities between the labeling method and how you designate t For example, `remote.bunny-lab.io` would be written as `remote-bunny-lab-io`. This keeps things organized and easy to read if you are troubleshooting things in Traefik's logs or webUI. The complete configuration file would look like the example below: - ```jsx title="/etc/traefik/dynamic/remote.bunny-lab.io.yml" + ```yaml title="/etc/traefik/dynamic/remote.bunny-lab.io.yml" http: routers: remote-bunny-lab-io: