Update Servers/Containerization/Docker/Compose/Traefik.md
This commit is contained in:
@ -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.
|
- 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
|
### Stack Deployment Information
|
||||||
```jsx title="docker-compose.yml"
|
```yaml title="docker-compose.yml"
|
||||||
version: "3.3"
|
version: "3.3"
|
||||||
services:
|
services:
|
||||||
traefik:
|
traefik:
|
||||||
@ -103,7 +103,7 @@ networks:
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```jsx title=".env"
|
```yaml title=".env"
|
||||||
CF_API_EMAIL=nicole.rappe@bunny-lab.io
|
CF_API_EMAIL=nicole.rappe@bunny-lab.io
|
||||||
CF_API_KEY=REDACTED-CLOUDFLARE-DOMAIN-API-KEY
|
CF_API_KEY=REDACTED-CLOUDFLARE-DOMAIN-API-KEY
|
||||||
LETSENCRYPT_EMAIL=nicole.rappe@bunny-lab.io
|
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
|
### 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:
|
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:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.gitea.rule=Host(`example.bunny-lab.io`)"
|
- "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:
|
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:
|
http:
|
||||||
routers:
|
routers:
|
||||||
example:
|
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:
|
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:
|
http:
|
||||||
routers:
|
routers:
|
||||||
remote-bunny-lab-io:
|
remote-bunny-lab-io:
|
||||||
|
Reference in New Issue
Block a user