-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (62 loc) 路 1.49 KB
/
Copy pathdocker-compose.yml
File metadata and controls
66 lines (62 loc) 路 1.49 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
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: parseon
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d parseon"]
interval: 5s
timeout: 3s
retries: 10
mongodb:
profiles: ["mongodb"]
image: mongo:8
command: ["--replSet", "rs0", "--bind_ip_all"]
ports:
- "27017:27017"
volumes:
- mongodata:/data/db
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping').ok"]
interval: 5s
timeout: 3s
retries: 20
mongodb-init:
profiles: ["mongodb"]
image: mongo:8
depends_on:
mongodb:
condition: service_healthy
restart: "no"
command:
- mongosh
- mongodb://mongodb:27017/admin
- --quiet
- --eval
- >-
try { rs.status() } catch (error) {
rs.initiate({_id: 'rs0', members: [{_id: 0, host: 'localhost:27017'}]})
}
erpc:
profiles: ["erpc"]
image: ghcr.io/erpc/erpc:0.1.1
command: ["/erpc-server", "--config", "/root/erpc.yaml"]
restart: unless-stopped
environment:
# Go soft memory limit: ~90% of mem_limit to avoid hard OOM kills.
GOMEMLIMIT: 2700MiB
mem_limit: 3g
ports:
- "4000:4000"
- "4001:4001"
volumes:
- ./erpc.yaml:/root/erpc.yaml:ro
volumes:
pgdata:
mongodata: