-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (52 loc) · 1.86 KB
/
Copy pathdocker-compose.yml
File metadata and controls
60 lines (52 loc) · 1.86 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
version: '3.8'
services:
web:
image: ghcr.io/vreshch/diffractwd.com:latest
restart: unless-stopped
networks:
- traefik-public
deploy:
replicas: 1
update_config:
order: start-first
failure_action: rollback
delay: 10s
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
labels:
# Enable Traefik
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.constraint-label=traefik-public
# HTTP Router (redirect to HTTPS, but allow ACME challenges)
- traefik.http.routers.diffractwd-http.rule=Host(`diffractwd.com`) || Host(`www.diffractwd.com`)
- traefik.http.routers.diffractwd-http.entrypoints=http
- traefik.http.routers.diffractwd-http.middlewares=https-redirect
# Create HTTPS redirect middleware that allows ACME challenges
- traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
- traefik.http.middlewares.https-redirect.redirectscheme.permanent=true
# HTTPS Router
- traefik.http.routers.diffractwd-https.rule=Host(`diffractwd.com`) || Host(`www.diffractwd.com`)
- traefik.http.routers.diffractwd-https.entrypoints=https
- traefik.http.routers.diffractwd-https.tls=true
- traefik.http.routers.diffractwd-https.tls.certresolver=letsencrypt
# Service configuration
- traefik.http.services.diffractwd.loadbalancer.server.port=3001
resources:
limits:
cpus: '0.5'
memory: 256M
reservations:
cpus: '0.25'
memory: 128M
healthcheck:
test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://127.0.0.1:3001/']
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
traefik-public:
external: true