forked from relaywirelessapi/helium-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
194 lines (184 loc) · 4.32 KB
/
docker-compose.yml
File metadata and controls
194 lines (184 loc) · 4.32 KB
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
services:
db:
build:
context: .
dockerfile: Dockerfile.postgres
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7
volumes:
- redis_data:/data
ports:
- "6379:6379"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 5s
retries: 5
chrome:
image: seleniarm/standalone-chromium
ports:
- 4444:4444
- 7900:7900
- 5900:5900
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:4444/wd/hub/status" ]
interval: 5s
timeout: 5s
retries: 5
mailcatcher:
platform: linux/x86_64
image: dockage/mailcatcher:0.9.0
ports:
- "1080:1080"
- "1025:1025"
healthcheck:
interval: 10s
retries: 10
test: wget --no-verbose --tries=1 --spider http://mailcatcher:1080 || exit 1
stripe:
image: stripe/stripe-cli:latest
command: listen --forward-to web:3000/pay/webhooks/stripe
env_file:
- path: .env
depends_on:
web:
condition: service_healthy
healthcheck:
test: ["CMD", "stripe", "status"]
interval: 10s
timeout: 5s
retries: 5
web:
build:
context: ./api
dockerfile: Dockerfile.dev
args:
BUNDLE_GEMS__CONTRIBSYS__COM: ${BUNDLE_GEMS__CONTRIBSYS__COM}
command: bin/rails server -b 0.0.0.0
volumes:
- ./api:/app
ports:
- "3000:3000"
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432
REDIS_URL: redis://redis:6379/1
env_file:
- path: .env
required: false
- ./api/.env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
chrome:
condition: service_healthy
css:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:3000/" ]
interval: 10s
timeout: 5s
retries: 3
tty: true
css:
build:
context: ./api
dockerfile: Dockerfile.dev
args:
BUNDLE_GEMS__CONTRIBSYS__COM: ${BUNDLE_GEMS__CONTRIBSYS__COM}
command: bin/rails tailwindcss:watch
volumes:
- ./api:/app
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432
REDIS_URL: redis://redis:6379/1
env_file:
- path: .env
required: false
- ./api/.env
healthcheck:
test: [ "CMD-SHELL", "ps aux | grep '[t]ailwindcss:watch' || exit 1" ]
interval: 10s
timeout: 5s
retries: 3
tty: true
sidekiq:
build:
context: ./api
dockerfile: Dockerfile.dev
args:
BUNDLE_GEMS__CONTRIBSYS__COM: ${BUNDLE_GEMS__CONTRIBSYS__COM}
command: bundle exec sidekiq
volumes:
- ./api:/app
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432
REDIS_URL: redis://redis:6379/1
env_file:
- path: .env
required: false
- ./api/.env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "ps aux | grep '[s]idekiq'" ]
interval: 10s
timeout: 5s
retries: 3
clockwork:
build:
context: ./api
dockerfile: Dockerfile.dev
args:
BUNDLE_GEMS__CONTRIBSYS__COM: ${BUNDLE_GEMS__CONTRIBSYS__COM}
command: bundle exec clockwork clock.rb
volumes:
- ./api:/app
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432
REDIS_URL: redis://redis:6379/1
env_file:
- path: .env
required: false
- ./api/.env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "ps aux | grep '[c]lockwork' || exit 1" ]
interval: 10s
timeout: 5s
retries: 3
docs:
build:
context: ./docs
dockerfile: Dockerfile.dev
ports:
- "3001:3000"
volumes:
- ./docs:/app
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:3000/" ]
interval: 10s
timeout: 5s
retries: 3
volumes:
postgres_data:
redis_data: