-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (66 loc) · 1.74 KB
/
docker-compose.yml
File metadata and controls
71 lines (66 loc) · 1.74 KB
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
services:
postgres:
image: postgres:17-alpine
volumes:
- /var/data/faultline/postgres:/var/lib/postgresql/data
environment:
POSTGRES_USER: faultline
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-faultline}
POSTGRES_DB: faultline_production
healthcheck:
test: ["CMD-SHELL", "pg_isready -U faultline"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
volumes:
- /var/data/faultline/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
web:
build: .
ports:
- "3000:3000"
env_file: .env
environment:
DATABASE_URL: postgres://faultline:${POSTGRES_PASSWORD:-faultline}@postgres:5432/faultline_production
REDIS_URL: redis://redis:6379/0
AGENT_SERVICE_URL: http://agent:8000
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
# Run migrations on startup, then start the server
command: >
bash -c "
bin/rails db:prepare &&
exec bin/rails server -b 0.0.0.0
"
worker:
build: .
command: ["bundle", "exec", "sidekiq"]
env_file: .env
environment:
DATABASE_URL: postgres://faultline:${POSTGRES_PASSWORD:-faultline}@postgres:5432/faultline_production
REDIS_URL: redis://redis:6379/0
AGENT_SERVICE_URL: http://agent:8000
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
agent:
build: ./agent_service
env_file: .env
expose:
- "8000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 3