-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
179 lines (170 loc) · 4.98 KB
/
docker-compose.yml
File metadata and controls
179 lines (170 loc) · 4.98 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
networks:
tils-intranet:
driver: bridge
services:
postgres:
image: postgres:16-alpine
networks: [tils-intranet]
environment:
POSTGRES_DB: tils
POSTGRES_USER: tils
POSTGRES_PASSWORD: tils
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./schema:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tils -d tils"]
interval: 5s
timeout: 5s
retries: 5
curios-manager:
build:
context: .
dockerfile: curios-manager/Dockerfile
networks: [tils-intranet]
ports:
- "50151:50151"
healthcheck:
test: ["CMD", "/grpc-health-probe", "-addr=:50151"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
environment:
DATABASE_URL: postgres://tils:tils@postgres:5432/tils
GRPC_PORT: "50151"
NODE_KEY_PATH: /data/node.key
NODE_PUBKEY_PATH: /data/node.pub
NETWORK_GRPC: network-manager:50154
REGISTER_ADDRESS: curios-manager:50151
LCP_SERVER_URL: ${LCP_SERVER_URL:-}
LSD_SERVER_URL: ${LSD_SERVER_URL:-}
LSD_PUBLIC_URL: ${LSD_PUBLIC_URL:-}
LCP_PROVIDER_URL: ${BFF_PUBLIC_URL:-http://localhost:3000}
volumes:
- node_identity:/data
depends_on:
postgres:
condition: service_healthy
users-manager:
build:
context: .
dockerfile: users-manager/Dockerfile
networks: [tils-intranet]
ports:
- "50152:50152"
healthcheck:
test: ["CMD", "/grpc-health-probe", "-addr=:50152"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
environment:
DATABASE_URL: postgres://tils:tils@postgres:5432/tils
GRPC_PORT: "50152"
NODE_KEY_PATH: /data/node.key
NODE_PUBKEY_PATH: /data/node.pub
NETWORK_GRPC: network-manager:50154
REGISTER_ADDRESS: users-manager:50152
volumes:
- node_identity:/data
depends_on:
postgres:
condition: service_healthy
network-manager:
build:
context: .
dockerfile: network-manager/Dockerfile
networks: [tils-intranet]
ports:
- "50153:50153"
# Internal port 50154 is NOT exposed to the host — Docker-private only.
healthcheck:
test: ["CMD", "/grpc-health-probe", "-addr=:50154"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
environment:
DATABASE_URL: postgres://tils:tils@postgres:5432/tils
GRPC_PORT: "50153"
INTERNAL_GRPC_PORT: "50154"
NODE_KEY_PATH: /data/node.key
NODE_PUBKEY_PATH: /data/node.pub
NODE_CERT_PATH: /data/node.crt
volumes:
- node_identity:/data
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
postgres:
condition: service_healthy
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
networks: [tils-intranet]
ports:
- "3000:3000"
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:3000/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
environment:
ORIGIN: ${ORIGIN:-http://localhost:3000}
NETWORK_GRPC: network-manager:50154
# CURIOS_GRPC / USERS_GRPC are optional overrides; without them the frontend
# discovers services via network-manager's LocalDirectory (Lookup + WhoAmI).
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
GOOGLE_REDIRECT_URI: ${GOOGLE_REDIRECT_URI:-http://localhost:3000/auth/callback/google}
LCP_SERVER_URL: ${LCP_SERVER_URL:-}
LSD_SERVER_URL: ${LSD_SERVER_URL:-}
LSD_PUBLIC_URL: ${LSD_PUBLIC_URL:-}
volumes:
- node_identity:/data
depends_on:
network-manager:
condition: service_healthy
# ─── Readium LCP / LSD — opt-in: docker compose --profile lcp up ────────────
# The lcp-server image must be built from source:
# https://github.com/readium/readium-lcp-server
# Set LCP_SERVER_URL=http://lcp-server:10000 etc. in your .env to wire it in.
lcp-server:
image: ${LCP_SERVER_IMAGE:-readium/lcp-server:latest}
profiles: [lcp]
networks: [tils-intranet]
ports:
- "10000:10000"
environment:
LCPSERVER_DB_URL: postgres://tils:tils@postgres:5432/tils
LCPSERVER_STORAGE_PATH: /content
LCPSERVER_HOST: lcp-server
LCPSERVER_PORT: "10000"
volumes:
- lcp_content:/content
depends_on:
postgres:
condition: service_healthy
lsd-server:
image: ${LSD_SERVER_IMAGE:-readium/lsd-server:latest}
profiles: [lcp]
networks: [tils-intranet]
ports:
- "10001:10001"
environment:
LSDSERVER_DB_URL: postgres://tils:tils@postgres:5432/tils
LSDSERVER_HOST: lsd-server
LSDSERVER_PORT: "10001"
LSDSERVER_PUBLIC_BASE_URL: ${LSD_PUBLIC_URL:-http://localhost:10001}
depends_on:
postgres:
condition: service_healthy
volumes:
pgdata:
node_identity:
lcp_content: