Initial commit
This commit is contained in:
commit
b49546005e
|
@ -0,0 +1,21 @@
|
||||||
|
# Traefik Container
|
||||||
|
|
||||||
|
## Running in development
|
||||||
|
|
||||||
|
```
|
||||||
|
podman network exists web || podman network create web
|
||||||
|
podman-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## Running in production
|
||||||
|
|
||||||
|
```
|
||||||
|
# Create a place to store configuration snippets for the file provider, if one
|
||||||
|
# does not yet exist. A known external volume is used since podman-compose will prefix
|
||||||
|
# non-external volumes with the project slug, making it less predictable for
|
||||||
|
# production deployments.
|
||||||
|
sudo podman volume exists traefik_config || sudo podman volume create traefik_config
|
||||||
|
sudo podman-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
It is possible to run this with a systemd service.
|
|
@ -0,0 +1,10 @@
|
||||||
|
[http]
|
||||||
|
[http.routers]
|
||||||
|
[http.routers.whoami]
|
||||||
|
entryPoints = ["http"]
|
||||||
|
rule = "Host(`whoami.localhost`)"
|
||||||
|
service = "whoami"
|
||||||
|
[http.services]
|
||||||
|
[http.services.whoami.loadBalancer]
|
||||||
|
[[http.services.whoami.loadBalancer.servers]]
|
||||||
|
url = "http://whoami/"
|
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
web:
|
||||||
|
external: false
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
certs:
|
||||||
|
# This is defined as external since configuration management
|
||||||
|
# software will place necessary configuration snippets there.
|
||||||
|
traefik_config:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
reverse-proxy:
|
||||||
|
environment:
|
||||||
|
- TRAEFIK_API_INSECURE=false
|
||||||
|
ports:
|
||||||
|
# The HTTP port
|
||||||
|
- "80:80"
|
||||||
|
# TLS
|
||||||
|
- "443:443"
|
||||||
|
volumes:
|
||||||
|
- ./traefik.toml:/traefik.toml:ro
|
||||||
|
- traefik_config:/traefik.conf.d:ro
|
||||||
|
- certs:/certs
|
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
web:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
reverse-proxy:
|
||||||
|
image: docker.io/traefik:latest
|
||||||
|
command:
|
||||||
|
- "--configFile=/traefik.toml"
|
||||||
|
environment:
|
||||||
|
- TRAEFIK_API_INSECURE=true
|
||||||
|
ports:
|
||||||
|
# The HTTP port
|
||||||
|
- "8080:80"
|
||||||
|
# The Web UI (enabled by --api.insecure=true)
|
||||||
|
- "8081:8080"
|
||||||
|
# TLS
|
||||||
|
- "8443:443"
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
volumes:
|
||||||
|
- ./traefik.toml:/traefik.toml:ro
|
||||||
|
- ./conf.d:/traefik.conf.d:ro
|
Loading…
Reference in New Issue