Require explicit VERSION in docker-compose files
This commit is contained in:
parent
d62bd06b37
commit
0220de3650
13
README.md
13
README.md
@ -6,7 +6,9 @@ Encrypt. While similar, the docker-compose files available here cater to
|
|||||||
different use cases for deploying Traefik.
|
different use cases for deploying Traefik.
|
||||||
|
|
||||||
## Add services to Traefik
|
## Add services to Traefik
|
||||||
|
|
||||||
1. Define the external traefik network on the top-level networks key
|
1. Define the external traefik network on the top-level networks key
|
||||||
|
|
||||||
```
|
```
|
||||||
networks:
|
networks:
|
||||||
traefik:
|
traefik:
|
||||||
@ -14,12 +16,14 @@ networks:
|
|||||||
```
|
```
|
||||||
|
|
||||||
2. Attach your web container to Traefik's network via the service-level `networks` key
|
2. Attach your web container to Traefik's network via the service-level `networks` key
|
||||||
|
|
||||||
```
|
```
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Define routing for Traefik in labels, replacing "examplerouter" with something unique
|
3. Define routing for Traefik in labels, replacing "examplerouter" with something unique
|
||||||
|
|
||||||
```
|
```
|
||||||
labels:
|
labels:
|
||||||
traefik.http.routers.examplerouter.rule: Host(`www.example.org`)
|
traefik.http.routers.examplerouter.rule: Host(`www.example.org`)
|
||||||
@ -30,30 +34,35 @@ networks:
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Variables
|
## Variables
|
||||||
|
|
||||||
Here's a brief explanation of the variables used in the docker-compose files:
|
Here's a brief explanation of the variables used in the docker-compose files:
|
||||||
|
|
||||||
### Docker Settings
|
### Docker Settings
|
||||||
|
|
||||||
- `IMAGE`: The name of the Docker image (default: `traefik`).
|
- `IMAGE`: The name of the Docker image (default: `traefik`).
|
||||||
- `VERSION`: The tag of the Docker image (default: `latest`).
|
- `VERSION`: The tag of the Docker image (required, no default).
|
||||||
- `NAME`: The name assigned to the created container (default: `traefik`).
|
- `NAME`: The name assigned to the created container (default: `traefik`).
|
||||||
|
|
||||||
### Traefik Settings
|
### Traefik Settings
|
||||||
|
|
||||||
- `DASHBOARD`: Enable(=true) or disable(=false) the Traefik API dashboard (default: `false`).
|
- `DASHBOARD`: Enable(=true) or disable(=false) the Traefik API dashboard (default: `false`).
|
||||||
- `DOMAIN`: The domain name where Traefik's dashboard is accessible (default: `traefik.local.krislamo.org`).
|
- `DOMAIN`: The domain name where Traefik's dashboard is accessible (default: `traefik.local.krislamo.org`).
|
||||||
- `ENTRYPOINT`: The entry point for the dashboard (default: `local`).
|
- `ENTRYPOINT`: The entry point for the dashboard (default: `local`).
|
||||||
- `EXPOSED_BY_DEFAULT`: Expose Docker containers by default without needing specific labels (default: `false`).
|
- `EXPOSED_BY_DEFAULT`: Expose Docker containers by default without needing specific labels (default: `false`).
|
||||||
|
|
||||||
### Network Settings
|
### Network Settings
|
||||||
|
|
||||||
- `NETWORK`: The Docker network to be used (default: `traefik`).
|
- `NETWORK`: The Docker network to be used (default: `traefik`).
|
||||||
- `WEB_PORT`: Binding for the regular HTTP traffic (defaults vary).
|
- `WEB_PORT`: Binding for the regular HTTP traffic (defaults vary).
|
||||||
- `WEBSECURE_PORT`: Binding for HTTPS traffic (default: `0.0.0.0:443:443`, only on HTTPS version).
|
- `WEBSECURE_PORT`: Binding for HTTPS traffic (default: `0.0.0.0:443:443`, only on HTTPS version).
|
||||||
- `LOCAL_PORT`: Binding for local HTTPS traffic (default: `127.0.0.1:8443:8443`).
|
- `LOCAL_PORT`: Binding for local HTTPS traffic (default: `127.0.0.1:8443:8443`).
|
||||||
|
|
||||||
### Other Settings
|
### Other Settings
|
||||||
|
|
||||||
- `LOG_LEVEL`: Logging level (default: `ERROR`).
|
- `LOG_LEVEL`: Logging level (default: `ERROR`).
|
||||||
- `DEBUG`: Enable(=true) or turn off(=false) API debugging (default: `false`).
|
- `DEBUG`: Enable(=true) or turn off(=false) API debugging (default: `false`).
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is released under the 0BSD license, which allows for unrestricted
|
This project is released under the 0BSD license, which allows for unrestricted
|
||||||
use, modification, and distribution.
|
use, modification, and distribution.
|
||||||
|
@ -7,7 +7,7 @@ networks:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
traefik:
|
traefik:
|
||||||
image: "${IMAGE:-traefik}:${VERSION:-latest}"
|
image: "${IMAGE:-traefik}:${VERSION:?}"
|
||||||
container_name: "${NAME:-traefik}"
|
container_name: "${NAME:-traefik}"
|
||||||
command:
|
command:
|
||||||
- --providers.docker=true
|
- --providers.docker=true
|
||||||
|
@ -7,7 +7,7 @@ networks:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
traefik:
|
traefik:
|
||||||
image: "${IMAGE:-traefik}:${VERSION:-latest}"
|
image: "${IMAGE:-traefik}:${VERSION:?}"
|
||||||
container_name: "${NAME:-traefik}"
|
container_name: "${NAME:-traefik}"
|
||||||
command:
|
command:
|
||||||
- --providers.docker=true
|
- --providers.docker=true
|
||||||
|
Loading…
Reference in New Issue
Block a user