-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Expand file tree
/
Copy pathcompose.yml
More file actions
118 lines (111 loc) · 2.85 KB
/
Copy pathcompose.yml
File metadata and controls
118 lines (111 loc) · 2.85 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: reactive_resume
services:
postgres:
image: postgres:latest
restart: unless-stopped
networks:
- data_network
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "postgres"]
start_period: 10s
interval: 30s
timeout: 10s
retries: 3
redis:
image: redis:latest
restart: unless-stopped
command: redis-server --appendonly yes
networks:
- data_network
# Not exposed on the host by default. Redis can contain agent stream data
# including user chat content; keep it internal to the Docker network.
# Uncomment the ports block below if you need host access for tooling.
# ports:
# - "127.0.0.1:6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
start_period: 5s
interval: 30s
timeout: 10s
retries: 3
seaweedfs:
image: chrislusf/seaweedfs:latest
restart: unless-stopped
command: server -s3 -filer -dir=/data -ip=0.0.0.0
networks:
- storage_network
environment:
- AWS_ACCESS_KEY_ID=seaweedfs
- AWS_SECRET_ACCESS_KEY=seaweedfs
ports:
- "8333:8333"
volumes:
- seaweedfs_data:/data
healthcheck:
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://localhost:8888"]
start_period: 10s
interval: 30s
timeout: 10s
retries: 3
seaweedfs_create_bucket:
image: quay.io/minio/mc:latest
restart: on-failure
entrypoint: >
/bin/sh -c "
sleep 5;
mc alias set seaweedfs http://seaweedfs:8333 seaweedfs seaweedfs;
mc mb seaweedfs/reactive-resume;
exit 0;
"
networks:
- storage_network
depends_on:
seaweedfs:
condition: service_healthy
reactive_resume:
# image: ghcr.io/amruthpillai/reactive-resume:latest
build:
context: .
dockerfile: Dockerfile
networks:
- data_network
- storage_network
ports:
- "3000:3000"
env_file:
- path: .env.example
required: false
volumes:
- ./data:/app/data
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
seaweedfs:
condition: service_healthy
seaweedfs_create_bucket:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000/api/health').then((r) => { if (!r.ok) process.exit(1); }).catch(() => process.exit(1));"]
start_period: 10s
interval: 30s
timeout: 10s
retries: 3
volumes:
postgres_data:
redis_data:
seaweedfs_data:
networks:
data_network:
storage_network: