-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (32 loc) · 1.08 KB
/
docker-compose.yml
File metadata and controls
40 lines (32 loc) · 1.08 KB
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
version: "3.9"
services:
# https://doc.traefik.io/traefik/getting-started/install-traefik/
cdn:
image: ghcr.io/macbre/nginx-http3:1.29.4
container_name: elecena-cdn
hostname: cdn.elecena.pl
restart: always
ports:
- 127.0.0.1:2020:2020 # bind to local interface only!
- 127.0.0.1:2021:2021 # bind to local interface only!
volumes:
- "thumbnails:/tmp/thumbnails:rw"
- "./nginx.conf:/etc/nginx/main.d/main.conf"
- "./nginx-cdn.conf:/etc/nginx/conf.d/cdn.conf"
labels:
traefik.enable: true
traefik.http.routers.cdn_elecena.tls.certresolver: letsencrypt
traefik.http.routers.cdn_elecena.rule: Host(`static.elecena.pl`)
traefik.http.services.cdn_elecena.loadbalancer.server.port: 2020
healthcheck:
test: 'wget -q --spider -U "wget/healthcheck" http://0.0.0.0:2020/favicon.ico'
interval: 5s
timeout: 1s
retries: 3
volumes:
thumbnails:
# https://docs.docker.com/compose/networking/#configure-the-default-network
networks:
default:
name: public-network
external: true