-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (63 loc) · 1.44 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
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/hybrid_template_development
- REDIS_CACHE_URL=redis://redis:6379/0
- REDIS_SIDEKIQ_URL=redis://redis:6379/1
- REDIS_CABLE_URL=redis://redis:6379/2
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: hybrid_template_development
ports:
- "5433:5432"
volumes:
- hybrid_template_pgdata:/var/lib/postgresql/data
redis:
image: redis:6.2
ports:
- "6380:6379"
volumes:
hybrid_template_pgdata: