-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (69 loc) · 2.3 KB
/
docker-compose.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: '3.9'
services:
traefik:
image: traefik:${TRAEFIK_VERSION}
container_name: traefik
restart: on-failure
command:
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entryPoint.to=websecure
- --entrypoints.web.http.redirections.entryPoint.scheme=https
- --entrypoints.websecure.address=:443
- --certificatesresolvers.ghost-certresolver.acme.email=${ACME_EMAIL}
- --certificatesresolvers.ghost-certresolver.acme.storage=/letsencrypt/acme.json
- --certificatesresolvers.ghost-certresolver.acme.httpchallenge.entrypoint=web
- --providers.docker
- --providers.docker.exposedbydefault=false
- --providers.file.filename=/etc/traefik/traefik-dyn.toml
- --log.level=INFO
- --accesslog=true
- --api.dashboard=true
- --api.insecure=true
- --entryPoints.ping.address=:8082
- --ping.entryPoint=ping
- --ping=true
ports:
- "80:80"
- "443:443"
- "127.0.0.1:8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- letsencrypt-data:/letsencrypt
- ./traefik-dyn.toml:/etc/traefik/traefik-dyn.toml
healthcheck:
interval: 3s
timeout: 3s
retries: 5
test: traefik healthcheck --ping --entryPoints.ping.address=:8082 --ping.entryPoint=ping
ghost:
image: ghost:${GHOST_VERSION}
container_name: ghost
restart: on-failure
environment:
- url=https://${HOST}
- mail__transport=SMTP
- mail__from=${MAIL_FROM}
- mail__options__host=${MAIL_HOST}
- mail__options__port=${MAIL_PORT}
- mail__options__secure=true
- mail__options__auth__user=${MAIL_USER}
- mail__options__auth__pass=${MAIL_PASS}
labels:
- traefik.enable=true
- traefik.http.routers.ghost.tls=true
- traefik.http.routers.ghost.tls.certresolver=ghost-certresolver
- traefik.http.routers.ghost.rule=Host(`${HOST}`)
- traefik.http.routers.ghost.entrypoints=websecure
- traefik.http.services.ghost.loadbalancer.server.port=2368
volumes:
- ghost-data:/var/lib/ghost/content
healthcheck:
interval: 10s
timeout: 3s
retries: 5
test: timeout 3 bash -c '</dev/tcp/ghost/2368'
volumes:
ghost-data:
driver: local
letsencrypt-data:
driver: local