-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
180 lines (170 loc) · 3.71 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
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
# docker version 1.12.0+
# docker-compose version 1.9.0+
version: '2.1'
services:
web:
image: jwilder/nginx-proxy:alpine
mem_limit: 64m
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
hostname: web
domainname: ${RS_DOMAIN}
networks:
local:
aliases:
- web
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- web-certs:/etc/nginx/certs:ro
- web-dhparam:/etc/nginx/dhparam
- web-vhostd:/etc/nginx/vhost.d
- web-challenge:/usr/share/nginx/html
restart: unless-stopped
# web-ssl:
# image: jrcs/letsencrypt-nginx-proxy-companion
# mem_limit: 64m
# hostname: web-ssl
# domainname: ${RS_DOMAIN}
# networks:
# local:
# aliases:
# - web
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock:ro
# - web-certs:/etc/nginx/certs:rw
# - web-dhparam:/etc/nginx/dhparam:rw
# - web-vhostd:/etc/nginx/vhost.d
# - web-challenge:/usr/share/nginx/html
# restart: unless-stopped
app:
build:
context: .
dockerfile: Dockerfile
args:
RS_UID: 1000
RS_GIT_BRANCH: master
RS_GIT_REMOTE_URL: https://github.com/sharetribe/sharetribe.git
RAILS_ENV: production
NODE_ENV: production
image: roobykon/sharetribe
mem_limit: 1024m
hostname: app
domainname: ${RS_DOMAIN}
networks:
local:
aliases:
- app
volumes:
- app:/opt/app/www
depends_on:
mysql:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:${PORT-3000}"]
timeout: 300s
restart: unless-stopped
env_file: .env
environment:
- VIRTUAL_HOST=${RS_DOMAIN}
- VIRTUAL_PORT=${PORT:-3000}
- LETSENCRYPT_HOST=${RS_DOMAIN}
- LETSENCRYPT_EMAIL=admin@${RS_DOMAIN}
worker:
image: roobykon/sharetribe
mem_limit: 512m
hostname: worker
domainname: ${RS_DOMAIN}
networks:
local:
aliases:
- sendmail
- worker
- search
ports:
- 127.0.0.1:1080:1080
volumes:
- app:/opt/app/www
command: worker
depends_on:
mysql:
condition: service_healthy
restart: unless-stopped
env_file: .env
mysql:
image: mysql:5.7
mem_limit: 512m
hostname: mysql
domainname: ${RS_DOMAIN}
networks:
local:
aliases:
- mysql
volumes:
- mysql:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping"]
restart: unless-stopped
env_file: .env
smtp:
image: catatnight/postfix
mem_limit: 64m
hostname: smtp
domainname: ${RS_DOMAIN}
networks:
local:
aliases:
- smtp
depends_on:
mysql:
condition: service_healthy
restart: unless-stopped
env_file: .env
memcache:
image: redis:3.2-alpine
mem_limit: 64m
hostname: memcache
domainname: ${RS_DOMAIN}
networks:
local:
aliases:
- memcache
volumes:
- memcache:/data
depends_on:
mysql:
condition: service_healthy
restart: unless-stopped
adminer:
image: adminer:standalone
mem_limit: 64m
hostname: adminer
domainname: ${RS_DOMAIN}
networks:
local:
aliases:
- adminer
ports:
- 127.0.0.1:8080:8080
depends_on:
mysql:
condition: service_healthy
restart: unless-stopped
environment:
- ADMINER_DESIGN=nicu
volumes:
web-certs:
web-dhparam:
web-vhostd:
web-challenge:
app:
driver_opts:
type: none
device: ${PWD}/data
o: bind
mysql:
memcache:
networks:
local: