-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yml
More file actions
141 lines (130 loc) · 3.49 KB
/
Copy pathcompose.yml
File metadata and controls
141 lines (130 loc) · 3.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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Infrastructure services – run with: bun run dev:infra
# Three-node NATS JetStream cluster (@k2b/sync v6). Every node shares the same
# config below; only `--name` differs. Apps inside the compose network dial all
# three nodes; the host reaches node 1 on :4222 (clients) and :8222 (monitoring).
x-nats: &nats
image: nats:2.14.3-alpine
restart: unless-stopped
configs:
- source: nats_config
target: /etc/nats/nats.conf
- source: nats_system_config
target: /etc/nats/system.conf
healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:8222/healthz?js-enabled-only=true"]
interval: 2s
timeout: 2s
retries: 30
services:
postgres:
image: postgres:15-alpine
container_name: ipa_postgres
restart: unless-stopped
command: postgres -c max_connections=300
environment:
POSTGRES_DB: ipa
POSTGRES_USER: ipa
POSTGRES_PASSWORD: ipa
ports:
- "5432:5432"
volumes:
- ipa_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ipa -d ipa"]
interval: 2s
timeout: 2s
retries: 30
valkey:
image: docker.io/valkey/valkey:8-alpine
container_name: ipa_valkey
restart: unless-stopped
command: valkey-server --save 30 1 --loglevel warning
ports:
- "6379:6379"
volumes:
- ipa_valkey_data:/data
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 2s
timeout: 2s
retries: 30
nats-1:
<<: *nats
container_name: ipa_nats_1
command: --config /etc/nats/nats.conf --name ipa_nats_1
ports:
- "4222:4222"
- "8222:8222"
volumes:
- ipa_nats_1_data:/data
nats-2:
<<: *nats
container_name: ipa_nats_2
command: --config /etc/nats/nats.conf --name ipa_nats_2
volumes:
- ipa_nats_2_data:/data
nats-3:
<<: *nats
container_name: ipa_nats_3
command: --config /etc/nats/nats.conf --name ipa_nats_3
volumes:
- ipa_nats_3_data:/data
geo:
image: ghcr.io/valentinkolb/geo:latest
container_name: geo
restart: unless-stopped
ports:
- "8081:4000"
filegate:
image: ghcr.io/valentinkolb/filegate:latest
container_name: filegate
restart: unless-stopped
environment:
FILE_PROXY_TOKEN: ${FILEGATE_TOKEN:-dev-secret-token}
ALLOWED_BASE_PATHS: /data/homes,/data/groups
PORT: "4000"
REDIS_URL: redis://valkey:6379
ports:
- "4000:4000"
volumes:
- filegate_homes:/data/homes
- filegate_groups:/data/groups
depends_on:
- valkey
gotenberg:
image: docker.io/gotenberg/gotenberg:8.36.0
container_name: gotenberg
restart: unless-stopped
ports:
- "3001:3000"
configs:
# Prepared by bun run dev:infra; contains only the admin public key.
nats_system_config:
file: ./.local/nats/system.conf
nats_config:
content: |
include system.conf
# max_payload must cover the largest @k2b/sync publish (notebooks Yjs
# full-state resync is ~8 MB); sync's ready() refuses smaller servers.
max_payload: 16MB
http: 0.0.0.0:8222
jetstream {
store_dir: /data
}
cluster {
name: ipa
listen: 0.0.0.0:6222
routes: [
nats-route://ipa_nats_1:6222
nats-route://ipa_nats_2:6222
nats-route://ipa_nats_3:6222
]
}
volumes:
ipa_postgres_data:
ipa_valkey_data:
ipa_nats_1_data:
ipa_nats_2_data:
ipa_nats_3_data:
filegate_homes:
filegate_groups: