forked from roobykon/sharetribe-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stack.yml
198 lines (189 loc) · 4.14 KB
/
stack.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# docker version 17.09.0+
version: '3.4'
services:
web:
image: jwilder/nginx-proxy:alpine
deploy:
# placement:
# constraints:
# - node.hostname == example.local
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
monitor: 30s
order: start-first
domainname: sharetribe.local
hostname: web
networks:
local:
aliases:
- web
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- web-certs:/etc/nginx/certs
- web-dhparam:/etc/nginx/dhparam
app:
image: kre100/sharetribe:latest
deploy:
# placement:
# constraints:
# - node.hostname == example.local
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
monitor: 30s
order: start-first
domainname: sharetribe.local
hostname: app
networks:
local:
aliases:
- app
volumes:
- app:/opt/app/www
environment:
- VIRTUAL_HOST=sharetribe.local
- VIRTUAL_PORT=3000
- RAILS_ENV=production
- NODE_ENV=production
- RS_DOMAIN=sharetribe.local
- RS_AUTH_USER=noreply
- RS_AUTH_PASS=passwd
- MYSQL_ROOT_PASSWORD=123123123
- MYSQL_DATABASE=sharetribe_db
- MYSQL_USER=user
- MYSQL_PASSWORD=passwd
- MYSQL_HOST=mysql
- SPHINX_HOST=search
- redis_host=memcache
- redis_port=6379
- redis_db=1
- redis_expires_in=240
worker:
image: kre100/sharetribe:latest
deploy:
# placement:
# constraints:
# - node.hostname == example.local
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
monitor: 30s
order: start-first
domainname: sharetribe.local
hostname: worker
networks:
local:
aliases:
- worker
- search
volumes:
- app:/opt/app/www
command: worker
environment:
- RAILS_ENV=production
- NODE_ENV=production
- RS_DOMAIN=sharetribe.local
- RS_AUTH_USER=noreply
- RS_AUTH_PASS=passwd
mysql:
image: mysql:5.7
deploy:
# placement:
# constraints:
# - node.hostname == example.local
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
monitor: 30s
order: start-first
domainname: sharetribe.local
hostname: mysql
networks:
local:
aliases:
- mysql
volumes:
- mysql:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=123123123
- MYSQL_DATABASE=sharetribe_db
- MYSQL_USER=user
- MYSQL_PASSWORD=passwd
smtp:
image: catatnight/postfix
deploy:
# placement:
# constraints:
# - node.hostname == example.local
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
monitor: 30s
order: start-first
domainname: sharetribe.local
hostname: smtp
networks:
local:
aliases:
- smtp
environment:
- maildomain=sharetribe.local
- smtp_user=noreply:passwd
memcache:
image: redis:3.2-alpine
deploy:
# placement:
# constraints:
# - node.hostname == example.local
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
monitor: 30s
order: start-first
domainname: sharetribe.local
hostname: memcache
networks:
local:
aliases:
- memcache
volumes:
- memcache:/data
adminer:
image: adminer:standalone
deploy:
# placement:
# constraints:
# - node.hostname == example.local
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
monitor: 30s
order: start-first
domainname: sharetribe.local
hostname: adminer
networks:
local:
aliases:
- adminer
ports:
- 8080:8080
volumes:
web-certs:
web-dhparam:
app:
mysql:
memcache:
networks:
local:
driver: overlay