This repository has been archived by the owner on Aug 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
89 lines (84 loc) · 1.73 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: '3'
services:
traefik:
image: quay.io/perriea/alpine-traefik:1.0
hostname: traefik
labels:
- "traefik.enable=false"
depends_on:
- wordpress
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 1
window: 120s
resources:
limits:
cpus: '20.000'
memory: 512M
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- public
- app-private
ports:
- "80:80"
- "443:443"
- "8080:8080"
mysql:
image: quay.io/perriea/alpine-mysql:1.0
hostname: mysql
labels:
- traefik.enable=false
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 1
window: 120s
resources:
limits:
cpus: '10.000'
memory: 512M
networks:
- db-private
volumes:
- db_data:/var/lib/mysql
wordpress:
image: quay.io/perriea/alpine-wordpress:1.0
hostname: wordpress
labels:
- traefik.enable=true
- traefik.backend=blog
- traefik.frontend.rule=Host:blog.example.com
- traefik.docker.network=app-private
- traefik.port=80
depends_on:
- mysql
deploy:
replicas: 2
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 1
window: 120s
resources:
limits:
cpus: '10.000'
memory: 256M
networks:
- app-private
- db-private
volumes:
- wordpress_data:/var/www/localhost/htdocs
volumes:
db_data: {}
wordpress_data: {}
traefik_data: {}
networks:
public: {}
app-private: {}
db-private: {}