-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
58 lines (55 loc) · 2.04 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: "3.4"
services:
traefik:
image: "traefik:${VERSION}"
container_name: "traefik"
command:
# - "--log.level=${LOG}"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure" #redirect all traffic to https
- "--entrypoints.web.http.redirections.entrypoint.scheme=https" #redirect all traffic to https
- "--certificatesresolvers.myresolver.acme.dnschallenge=true"
- "--certificatesresolvers.myresolver.acme.dnschallenge.provider=${PROVIDER}"
- "--certificatesresolvers.myresolver.acme.dnschallenge.resolvers=${RESOLVER}"
# - "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory" #For testing
- "--certificatesresolvers.myresolver.acme.email=${EMAIL}"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
# - "8080:8080"
- "443:443"
environment:
- TZ
- CF_DNS_API_TOKEN
- CF_ZONE_API_TOKEN
networks:
- proxy-net
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "letsencrypt:/letsencrypt"
- "./traefik.yml:/traefik/traefik.yml"
librespeed:
image: ghcr.io/linuxserver/librespeed
container_name: librespeed
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.speedtest.entrypoints=websecure"
- "traefik.http.routers.speedtest.tls=true"
- "traefik.http.routers.speedtest.tls.certresolver=myresolver"
- "traefik.http.routers.speedtest.rule=Host(`${SPEEDTEST}`)"
networks:
- proxy-net
volumes:
letsencrypt:
networks: #Create network manually if error on creating network due to host restriction e.g. docker create network proxynet
proxy-net:
external: true