-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
52 lines (49 loc) · 1.19 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
version: "3.8"
services:
web: &web
env_file:
- .env
build:
context: .
args:
RAILS_ENV: ${RAILS_ENV:-development}
environment:
- RAILS_ENV=${RAILS_ENV:-development}
- REDIS_URL=redis://redis-db:6379
- DATABASE_URL=postgres://root:password@postgres-db/qae_development
depends_on:
postgres-db:
condition: service_healthy
redis-db:
condition: service_started
command: /rails/bin/rails server
entrypoint: ["/rails/bin/docker-entrypoint"]
volumes:
- .:/rails:cached
ports:
- "3000:3000"
postgres-db:
image: postgres
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: password
POSTGRES_DB: qae_development
volumes:
- ./tmp/postgres-db:/var/lib/postgresql/data
- ./init-hstore.sql:/docker-entrypoint-initdb.d/init-hstore.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U root -d qae_development"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5432:5432"
restart: unless-stopped
redis-db:
image: redis
ports:
- "6379:6379"
sidekiq:
<<: *web
command: bundle exec sidekiq
ports: []