-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.network.yml
More file actions
66 lines (65 loc) · 2.58 KB
/
docker-compose.network.yml
File metadata and controls
66 lines (65 loc) · 2.58 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# INFO: `traefik` and (tiles_)`proxy` are required for production but should not run on development.
# Our current setup has them in this separate docke-compose files.
# To start those additional services they need to be started together with the main docker-compose.yml
# which means both files get merged.
# See `.github/workflows/restart-services.yml`:
# `docker compose -f docker-compose.yml -f docker-compose.network.yml up -d`
#
# FUTURE: We could merge those services into `docker-compose.yml` and use the `docker-compose.overwride.yml`
# to disable them from regular development use by adding a `profiles: - network` to them.
services:
traefik:
image: traefik:v3.6
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" # Change to INFO for debugging
- "--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"
logging:
driver: journald
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:
- ./logs:/var/log/nginx
# See cache_proxy/.README.md
- ./cache_proxy:/var/cache/nginx
configs:
- source: nginx_conf
target: /etc/nginx/nginx.conf
configs:
nginx_conf:
file: ./configs/nginx.conf