-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
50 lines (44 loc) · 971 Bytes
/
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
version: '3'
services:
db:
image: postgres:11.1
volumes:
- ./docker/init.sh:/docker-entrypoint-initdb.d/init.sh
- pg-data:/var/lib/postgresql/data
app: &app
image: startupcraftio/ruby-pg:2.7.0-11
command: bash
volumes:
- .:/app
- bundler-data:/usr/local/bundle/:cached
- bin-data:/usr/local/bin/:cached
environment:
- RAILS_ENV=${RAILS_ENV:-development}
depends_on:
- db
- redis
api:
<<: *app
command: bundle exec rails s -p 3001 -b '0.0.0.0'
environment:
- WEB_CONCURRENCY=${WEB_CONCURRENCY:-0}
ports:
- "3001:3001"
redis:
image: redis:alpine
sidekiq:
<<: *app
command: bundle exec sidekiq -C config/sidekiq.yml
nginx:
image: 'nginx'
ports:
- "80:80"
- "433:433"
volumes:
- './docker/nginx/nginx.dev.conf:/etc/nginx/nginx.conf'
depends_on:
- 'api'
volumes:
bundler-data:
bin-data:
pg-data: