-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (61 loc) · 1.38 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
services:
postgres:
image: postgres:15
container_name: tiny-insurer-db
ports: [5432:5432]
env_file:
- .env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 3s
retries: 5
volumes:
- database:/var/lib/postgresql/data
networks:
- my-bridge
policy-service:
image: 'ruby:3.3'
container_name: tiny-insurer-rest
env_file:
- .env
working_dir: /app
volumes:
- .:/app
- rubygems:/usr/local/bundle
ports: [3001:3001]
depends_on:
postgres:
condition: service_healthy
tty: true
stdin_open: true
networks:
- my-bridge
command: bash -c "rm -f tmp/pids/server.pid && bin/setup && rails s -b 0.0.0.0 -p 3001"
# healthcheck:
# test: ["CMD-SHELL", "curl", "-I", "http://localhost:3001/up"]
# interval: 5s
# timeout: 5s
# retries: 5
workers:
image: 'ruby:3.3'
container_name: tiny-insurer-workers
env_file:
- .env
working_dir: /app
tty: true
stdin_open: true
command: bash -c "rm -f tmp/pids/server.pid && WORKERS=PolicyWorker,PaymentWorker rake sneakers:run"
networks:
- my-bridge
volumes:
- .:/app
- rubygems:/usr/local/bundle
depends_on:
- policy-service
volumes:
database:
rubygems:
networks:
my-bridge:
name: my-bridge