Feat docs (#1814)
* improve docs and formatting * lint in ci avoid using bundled prettier from vscode extension * fix action, typos * remove header * remove unused deps
This commit is contained in:
@@ -20,25 +20,25 @@ File: `/etc/docker/containers/traefik/docker-compose.yml`
|
||||
|
||||
```yaml
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:3.3
|
||||
container_name: traefik
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443/tcp"
|
||||
- "443:443/udp"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /etc/docker/volumes/traefik/traefik.yml:/traefik.yml:ro
|
||||
- /etc/docker/volumes/traefik/traefik_dynamic.yml:/traefik_dynamic.yml:ro
|
||||
- /etc/docker/volumes/traefik/acme.json:/acme.json
|
||||
networks:
|
||||
- traefik
|
||||
traefik:
|
||||
image: traefik:3.3
|
||||
container_name: traefik
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '80:80'
|
||||
- '443:443/tcp'
|
||||
- '443:443/udp'
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /etc/docker/volumes/traefik/traefik.yml:/traefik.yml:ro
|
||||
- /etc/docker/volumes/traefik/traefik_dynamic.yml:/traefik_dynamic.yml:ro
|
||||
- /etc/docker/volumes/traefik/acme.json:/acme.json
|
||||
networks:
|
||||
- traefik
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
traefik:
|
||||
external: true
|
||||
```
|
||||
|
||||
## Create traefik.yml
|
||||
@@ -47,47 +47,47 @@ File: `/etc/docker/volumes/traefik/traefik.yml`
|
||||
|
||||
```yaml
|
||||
log:
|
||||
level: INFO
|
||||
level: INFO
|
||||
|
||||
entryPoints:
|
||||
web:
|
||||
address: ":80/tcp"
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: websecure
|
||||
scheme: https
|
||||
websecure:
|
||||
address: ":443/tcp"
|
||||
http:
|
||||
middlewares:
|
||||
- compress@file
|
||||
- hsts@file
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
http3: {}
|
||||
web:
|
||||
address: ':80/tcp'
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: websecure
|
||||
scheme: https
|
||||
websecure:
|
||||
address: ':443/tcp'
|
||||
http:
|
||||
middlewares:
|
||||
- compress@file
|
||||
- hsts@file
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
http3: {}
|
||||
|
||||
api:
|
||||
dashboard: true
|
||||
dashboard: true
|
||||
|
||||
certificatesResolvers:
|
||||
letsencrypt:
|
||||
acme:
|
||||
email: $mail@example.com$
|
||||
storage: acme.json
|
||||
httpChallenge:
|
||||
entryPoint: web
|
||||
letsencrypt:
|
||||
acme:
|
||||
email: $mail@example.com$
|
||||
storage: acme.json
|
||||
httpChallenge:
|
||||
entryPoint: web
|
||||
|
||||
providers:
|
||||
docker:
|
||||
watch: true
|
||||
network: traefik
|
||||
exposedByDefault: false
|
||||
file:
|
||||
filename: traefik_dynamic.yml
|
||||
docker:
|
||||
watch: true
|
||||
network: traefik
|
||||
exposedByDefault: false
|
||||
file:
|
||||
filename: traefik_dynamic.yml
|
||||
|
||||
serversTransport:
|
||||
insecureSkipVerify: true
|
||||
insecureSkipVerify: true
|
||||
```
|
||||
|
||||
## Create traefik_dynamic.yml
|
||||
@@ -96,33 +96,33 @@ File: `/etc/docker/volumes/traefik/traefik_dynamic.yml`
|
||||
|
||||
```yaml
|
||||
http:
|
||||
middlewares:
|
||||
services:
|
||||
basicAuth:
|
||||
users:
|
||||
- "$username$:$password$"
|
||||
compress:
|
||||
compress: {}
|
||||
hsts:
|
||||
headers:
|
||||
stsSeconds: 2592000
|
||||
routers:
|
||||
api:
|
||||
rule: Host(`traefik.$example.com$`)
|
||||
entrypoints:
|
||||
- websecure
|
||||
middlewares:
|
||||
- services
|
||||
service: api@internal
|
||||
middlewares:
|
||||
services:
|
||||
basicAuth:
|
||||
users:
|
||||
- '$username$:$password$'
|
||||
compress:
|
||||
compress: {}
|
||||
hsts:
|
||||
headers:
|
||||
stsSeconds: 2592000
|
||||
routers:
|
||||
api:
|
||||
rule: Host(`traefik.$example.com$`)
|
||||
entrypoints:
|
||||
- websecure
|
||||
middlewares:
|
||||
- services
|
||||
service: api@internal
|
||||
|
||||
tls:
|
||||
options:
|
||||
default:
|
||||
cipherSuites:
|
||||
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
|
||||
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
|
||||
sniStrict: true
|
||||
options:
|
||||
default:
|
||||
cipherSuites:
|
||||
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
|
||||
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
|
||||
sniStrict: true
|
||||
```
|
||||
|
||||
## Create acme.json
|
||||
|
||||
Reference in New Issue
Block a user