-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (63 loc) · 1.33 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
69
70
version: '3.7'
services:
app: &app
build:
context: .
args:
BUNDLE_IS_PRD: 'false'
image: fth-backend:1.0.4
backend: &backend
<<: *app
stdin_open: true
tty: true
volumes:
- .:/app
- bundle:/usr/local/bundle
environment:
- HANAMI_ENV=${HANAMI_ENV:-development}
command: >
sh -c "bundle check || bundle install &&
bundle exec puma -C config/puma.rb"
env_file:
- env/dev/web.env
depends_on:
- postgres
web:
<<: *backend
command: >
sh -c "bundle check || bundle install &&
bundle exec puma -C config/puma.rb"
ports:
- 3000:3000
depends_on:
- sidekiq
sidekiq:
<<: *backend
command: bundle exec sidekiq -e development -C config/sidekiq.yml -r ./config/boot.rb
depends_on:
- redis
- postgres
postgres:
image: postgres:14.8-alpine3.18
volumes:
- postgres_volume:/var/lib/postgresql/data
ports:
- 5435:5432
env_file: env/dev/db.env
healthcheck:
test: pg_isready -U app -h 127.0.0.1
interval: 5s
redis:
image: redis:alpine
logging:
driver: "none"
ports:
- 6379:6379
healthcheck:
test: redis-cli ping
interval: 1s
timeout: 3s
retries: 30
volumes:
bundle:
postgres_volume: