-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (62 loc) · 1.46 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.7'
services:
traefik:
image: traefik:2.2
container_name: traefik
ports:
# The HTTP port
- "80:80"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik/traefik.yml:/etc/traefik/traefik.yml:ro
networks:
- traefik
ghost_cms:
depends_on:
- db
- traefik
container_name: ghost_cms
image: ghost:3
env_file: .ghost.env
restart: always
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.cms.rule=Host(`cms.docker.localhost`)"
- "traefik.http.services.cms.loadbalancer.server.port=2368"
volumes:
- www-data:/var/lib/ghost/content
networks:
- traefik
- lan_cms
db:
image: mysql:5.7
container_name: mysql
env_file: .mysql.env
volumes:
- mysql-data:/var/lib/mysql
networks:
- lan_cms
ghost_static:
container_name: static
depends_on:
- traefik
image: gatsby-static:latest
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.static.rule=Host(`prod.docker.localhost`)"
- "traefik.http.services.static.loadbalancer.server.port=80"
networks:
- traefik
volumes:
mysql-data:
name: mysql-data
www-data:
name: www-data
networks:
lan_cms:
name: lan_cms
traefik:
name: traefik