-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.network.yml
54 lines (53 loc) · 1.86 KB
/
docker-compose.network.yml
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
services:
traefik:
image: traefik:v3.1
container_name: traefik
# Networking: See https://techoverflow.net/2021/06/11/how-to-fix-traefik-gateway-timeout-for-docker-services/ for network_mode
restart: unless-stopped
environment:
TZ: Europe/Berlin
command:
- "--log.level=WARN"
- "--api.insecure=false"
- "--api.dashboard=false"
- "--providers.docker=true"
# Do not expose containers unless explicitly told so
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.letsencrypt.acme.email=dev-team@fixmycity.de"
- "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
- "--serversTransport.forwardingTimeouts.dialTimeout=100s"
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "./letsencrypt:/letsencrypt"
proxy:
image: nginx:alpine
restart: unless-stopped
container_name: tiles_proxy
environment:
TZ: Europe/Berlin
labels:
traefik.enable: true
traefik.http.routers.proxy.rule: Host(`${TILES_URL}`)
traefik.http.routers.proxy.entrypoints: websecure
traefik.http.routers.proxy.tls.certresolver: letsencrypt
traefik.http.routers.proxy.tls: true
ports:
- "4444:80"
volumes:
- ./cache:/var/cache/nginx
- ./logs:/var/log/nginx
configs:
- source: nginx_conf
target: /etc/nginx/nginx.conf
configs:
nginx_conf:
file: ./configs/nginx.conf