-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
68 lines (64 loc) · 1.59 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
services:
web:
build:
context: .
dockerfile: Dockerfile.dev
command: >
bash -c '
rm -f tmp/pids/server.pid &&
bundle exec rails db:create &&
bundle exec rails db:migrate &&
bundle exec rails db:seed &&
bundle exec rails s -b 0.0.0.0 -p 3000
'
ports:
- "3000:3000"
environment:
- RAILS_ENV=development
- POSTGRES_HOST=db
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- DATABASE_URL=postgres://postgres:postgres@db:5432/graphql_template_development
- REDIS_CACHE_URL=redis://redis:6379/0
- REDIS_SIDEKIQ_URL=redis://redis:6379/1
- REDIS_CABLE_URL=redis://redis:6379/2
- SECRET_KEY_BASE=1d5248b6d7e9bcbdd706593c90a1fb3a7de5502b462e5a1f123e899ca75addee2d030c46759769076ace8af5c221634cc966406862a59d0748eb8d3bda20b275
volumes:
- .:/rails
- /rails/tmp
depends_on:
- db
- redis
- sidekiq
sidekiq:
build:
context: .
dockerfile: Dockerfile.dev
command: >
bash -c '
bundle exec sidekiq
'
environment:
- RAILS_ENV=development
- REDIS_SIDEKIQ_URL=redis://redis:6379/1
volumes:
- .:/rails
depends_on:
- redis
- db
db:
image: postgres:13
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: graphql_template_development
ports:
- "5433:5432"
volumes:
- graphql_template_pgdata:/var/lib/postgresql/data
redis:
image: redis:6.2
ports:
- "6380:6379"
volumes:
graphql_template_pgdata: