@cyaxis/ulvia 1.0.8 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INSTALLATION.md +140 -285
- package/README.md +157 -168
- package/SHARED-HOSTING.md +311 -0
- package/dist/definitions/services-tls.yml +0 -16
- package/dist/definitions/services.yml +30 -23
- package/dist/index.js +44452 -38769
- package/dist/stack-release.json +1 -0
- package/package.json +2 -1
- package/dist/definitions/edge-tls.yml +0 -5
- package/dist/definitions/edge.yml +0 -36
- package/dist/definitions/nginx/capability_cache.conf +0 -13
- package/dist/definitions/nginx/client_max_body.conf +0 -2
- package/dist/definitions/nginx/default_location +0 -8
- package/dist/definitions/nginx/query_safe_access_log.conf +0 -4
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
# Shared hosting
|
|
2
|
+
|
|
3
|
+
The hosting feature separates installation authority, CMS tenant state, domain
|
|
4
|
+
admission and the HTTP listener. The Provider creates empty Control using the
|
|
5
|
+
ordinary provisioning state machine and an explicit Control system plan. Its
|
|
6
|
+
persisted identity and current local administrator grants authorize
|
|
7
|
+
`ulvia/cms.hosting`; a name, collection or installed contract grants no such role.
|
|
8
|
+
|
|
9
|
+
## Provider startup and initial access
|
|
10
|
+
|
|
11
|
+
The Provider requires `ULVIA_CONTROL_ORIGIN` and `ULVIA_EDGE_ROUTING_SECRET`.
|
|
12
|
+
On a fresh installation, `ULVIA_CONTROL_BOOTSTRAP_FILE` points to an operator-owned
|
|
13
|
+
JSON file containing exactly `email` and `password`. The file is bounded to 4096
|
|
14
|
+
bytes and initial credentials are validated before reservation. The existing
|
|
15
|
+
encrypted provisioning credential store stages the administrator; successful
|
|
16
|
+
provisioning clears the staged password. Ready restarts do not require the file
|
|
17
|
+
or reset the account.
|
|
18
|
+
|
|
19
|
+
Installation phases are `reserved`, `provisioning` and `ready`. A missing marker
|
|
20
|
+
on a populated database refuses startup. Missing ready instance, credential or
|
|
21
|
+
domain state is an operator recovery error, not a reason to create replacements.
|
|
22
|
+
Instance readiness, domain verification and TLS readiness are distinct.
|
|
23
|
+
|
|
24
|
+
`ULVIA_HOSTING_MANAGED_SUFFIXES` optionally supplies a JSON array of at most 16
|
|
25
|
+
operator-owned DNS suffixes. Management creation can admit those origins without
|
|
26
|
+
a customer TXT proof. Localhost origins are allowed only for local installations;
|
|
27
|
+
HTTPS localhost still requires TLS. Customer claims require their exact DNS TXT
|
|
28
|
+
proof. No collections or Pages are bootstrapped for Control or other sites.
|
|
29
|
+
|
|
30
|
+
Hosting 1.1 also admits names under persisted, Control-owned verified DNS zones.
|
|
31
|
+
`zones.claim` returns a dedicated `_ulvia-zone` TXT proof; `zones.verify` checks it
|
|
32
|
+
once to grant apex/descendant admissions. `zones.list` is cursor-paged and
|
|
33
|
+
`zones.disable` removes that grant without modifying existing sites. Reclaiming a
|
|
34
|
+
disabled zone rotates its proof. See the [zone workflow](https://github.com/matthias-bernouy/CMS/blob/e5bd135c8e692867eb6fc298ff6c36be0c4ad6cc/packages/features/hosting/docs/management/zones.md).
|
|
35
|
+
|
|
36
|
+
## Contract boundaries
|
|
37
|
+
|
|
38
|
+
`ulvia/cms.hosting` has twelve HTTP/MCP instance, domain and zone operations. Creation
|
|
39
|
+
reserves the primary hostname and a unique request identity before provisioning,
|
|
40
|
+
so a conflict does not leave an orphan tenant. Exact retries reuse one persisted
|
|
41
|
+
identity; returned instance status distinguishes pending from ready. Lists use
|
|
42
|
+
bounded cursor pages. Management protects Control, its initial domain and an
|
|
43
|
+
already enabled exact Hosting selection.
|
|
44
|
+
|
|
45
|
+
Instance records persist immutable creation provenance: an operator entry point
|
|
46
|
+
or the original Control administrator actor. The creation fingerprint binds this
|
|
47
|
+
provenance, so a retry cannot substitute another creator. Provisioning and recovery
|
|
48
|
+
recheck the original actor before opening business services, before each unfinished
|
|
49
|
+
step and before committing readiness; completed replay also reauthorizes. Revoked
|
|
50
|
+
authority leaves the instance's business state unchanged, although an in-progress
|
|
51
|
+
transition can journal refusal. Restoring that actor's grant permits an explicit
|
|
52
|
+
retry without repeating completed steps. Missing persisted provenance is refused
|
|
53
|
+
without repair. Operator recovery remains a separate authenticated path.
|
|
54
|
+
|
|
55
|
+
Staged passwords are read only for administrator initialization, once on a normal
|
|
56
|
+
five-step creation rather than once per step. These checks add no domain scans or
|
|
57
|
+
persistence reads to ordinary Edge ingress. The operator creation endpoint returns
|
|
58
|
+
202 while provisioning is pending and 201 only for an actually ready instance.
|
|
59
|
+
Instance registry updates perform one indexed pre-read to validate mandatory
|
|
60
|
+
provenance followed by one revision-and-provenance CAS, replacing the former
|
|
61
|
+
single update. Invalid persisted provenance refuses before writing business state.
|
|
62
|
+
|
|
63
|
+
`ulvia/provider.routing` is a separate host-level, HTTP-only machine contract.
|
|
64
|
+
It is excluded from both ordinary and Control CMS plans. A signed `cms-edge`
|
|
65
|
+
invocation in the hosting technical scope can resolve one hostname. It cannot
|
|
66
|
+
invoke hosting administration or supply a CMS user identity.
|
|
67
|
+
|
|
68
|
+
The Edge receives a control lease lasting at most 60 seconds. The Provider verifies
|
|
69
|
+
its signature before doing persistence work, then checks the current domain and
|
|
70
|
+
instance revisions, assignment, origins and expiry before a report or broker
|
|
71
|
+
call. It never returns persistent tenant credentials or operator secrets. Existing
|
|
72
|
+
Installations capabilities still issue narrowly scoped business invocation tokens.
|
|
73
|
+
|
|
74
|
+
## Shared Edge
|
|
75
|
+
|
|
76
|
+
The Edge now starts with listener settings, `CMS_HOSTING_PROVIDER_URL` and
|
|
77
|
+
`CMS_HOSTING_EDGE_SECRET`. The old single-instance public URL and credential
|
|
78
|
+
configuration is rejected. `CMS_EDGE_MAX_CONTEXTS` defaults to 16 and accepts
|
|
79
|
+
1–128. Context loading is limited to four concurrent loads, each context to 64
|
|
80
|
+
active leases, and routing to 64 in-flight calls. Idle contexts expire after one
|
|
81
|
+
minute. A context holds at most 2 MiB of cached public representations, 128 cache
|
|
82
|
+
entries and eight concurrent cache fills.
|
|
83
|
+
|
|
84
|
+
Each ingress resolves the hostname before using a context or resource cache.
|
|
85
|
+
A context key includes hostname, canonical/public origins, instance identity and
|
|
86
|
+
domain/instance revisions. Loads coalesce and failed loads release capacity.
|
|
87
|
+
Contexts hold separate Gateways, route caches, public caches, OAuth/MCP origins,
|
|
88
|
+
cookie policies and bounded diagnostic sinks. Registered aliases redirect to the
|
|
89
|
+
canonical CMS origin. Forwarding headers do not select a tenant.
|
|
90
|
+
|
|
91
|
+
Provider and Edge runtime leases stay held through response body completion,
|
|
92
|
+
cancellation or abort. Shutdown stops the listener before draining contexts.
|
|
93
|
+
A context disposal failure closes admission rather than hiding the resource leak.
|
|
94
|
+
|
|
95
|
+
## Caddy and certificate readiness
|
|
96
|
+
|
|
97
|
+
`ulvia/provider.tls` is an admitted public read-only GET contract. Its sole
|
|
98
|
+
`certificates.permit` binding is `/hosting/tls/permission?domain=...`. Caddy uses
|
|
99
|
+
the status code from this binding. The surface constructs an isolated anonymous
|
|
100
|
+
hosting scope and discards caller identity, credentials and transport headers;
|
|
101
|
+
this does not expose signed CMS or Edge-routing capabilities.
|
|
102
|
+
|
|
103
|
+
Permission first reads the indexed domain and its target instance. Only verified
|
|
104
|
+
or active HTTPS domains with ready instances continue to DNS verification. Every
|
|
105
|
+
A/AAAA address must belong to the operator-configured installation, and the public
|
|
106
|
+
port must match its HTTPS listener. Domain and instance revisions are read again
|
|
107
|
+
after DNS. An unknown domain costs one indexed domain read; an eligible successful
|
|
108
|
+
permission costs two domain reads, two instance reads and bounded A/AAAA queries.
|
|
109
|
+
Permission has at most 16 concurrent requests and never mutates domain state.
|
|
110
|
+
|
|
111
|
+
The Provider accepts `ULVIA_TLS_ENTRYPOINTS`, a JSON array of at most eight
|
|
112
|
+
`host`/`port` objects, and `ULVIA_TLS_PUBLIC_ADDRESSES`, at most 32 IP addresses.
|
|
113
|
+
HTTPS Control requires entrypoints and explicit public-address configuration
|
|
114
|
+
outside local development. An explicit empty array permits DNS-pending bootstrap
|
|
115
|
+
but cannot grant certificate permission; configure the installation addresses
|
|
116
|
+
before expecting HTTPS readiness. `ULVIA_TLS_TRUST_FILE` optionally supplies at most 64 KiB of mounted PEM
|
|
117
|
+
trust for local/test authorities. DNS has a five-second deadline. TLS probes
|
|
118
|
+
connect only to configured entrypoints; tenant hostnames supply SNI, not socket
|
|
119
|
+
destinations. Chain and hostname validation remain enabled.
|
|
120
|
+
|
|
121
|
+
After the permission listener starts, one coalesced background batch seeks at
|
|
122
|
+
most 50 domains, with four workers. Each eligible domain must pass configuration
|
|
123
|
+
and certificate probes on every entrypoint before its revision-fenced TLS write
|
|
124
|
+
activates routing. At most 32 TLS sockets can be pending with eight nodes. Stable
|
|
125
|
+
readiness does not increment revisions. Failures are persisted as TLS failure and
|
|
126
|
+
reported as configuration/certificate/unavailable outcomes in operator logs;
|
|
127
|
+
stale completion cannot reactivate a disabled domain. Unexpected storage failures
|
|
128
|
+
are reported; the error path never overwrites another revision. Shutdown aborts probes and drains
|
|
129
|
+
the current batch before closing the listener.
|
|
130
|
+
|
|
131
|
+
The ten-second timer never overlaps a running batch. Larger registries require
|
|
132
|
+
multiple seek pages; readiness follows completion of the relevant background
|
|
133
|
+
check, not a fixed ten-second guarantee. Backend health is a separate gate:
|
|
134
|
+
existing certificates may reload before shared Edge upstreams become healthy.
|
|
135
|
+
|
|
136
|
+
`@bernouy/hosting/caddy` generates the optional Caddy adapter configuration with
|
|
137
|
+
static shared Edge destinations, active `/readyz` checks, round-robin balancing
|
|
138
|
+
and on-demand permission. There is no per-site destination or Docker socket.
|
|
139
|
+
The admin API is disabled. Explicit persistent certificate storage coordinates
|
|
140
|
+
multiple entrypoints; all nodes need a consistent shared store. Preserve Host
|
|
141
|
+
including its port and redirect HTTP using the configured public HTTPS port.
|
|
142
|
+
See the pinned [Caddy permission implementation](https://github.com/caddyserver/caddy/blob/v2.11.9/modules/caddytls/ondemand.go)
|
|
143
|
+
and [automatic certificate management](https://caddyserver.com/docs/automatic-https).
|
|
144
|
+
|
|
145
|
+
Disabling a domain denies new permission and the next Edge ingress. It does not
|
|
146
|
+
revoke an already issued certificate or immediately remove it from Caddy memory.
|
|
147
|
+
Certificate renewal is delegated to Caddy; forced renewal is not covered by the
|
|
148
|
+
current integration test.
|
|
149
|
+
|
|
150
|
+
## Private transport between shared services
|
|
151
|
+
|
|
152
|
+
The CLI supplies `ULVIA_HOSTING_PROXY_URL=http://proxy:8080`. Caddy's separate
|
|
153
|
+
unpublished HTTP listener uses the same shared Edge pool without the public
|
|
154
|
+
HTTPS redirect. This is a socket-routing adapter for existing admitted bindings,
|
|
155
|
+
not another capability protocol or instance selector. Logical CMS and Repository
|
|
156
|
+
URLs stay public, preserving account, PAT and Repository identity bindings.
|
|
157
|
+
|
|
158
|
+
Before each outbound request to a registered hostname, the Provider reads one
|
|
159
|
+
indexed domain and its ready target instance. A known disabled/pending domain,
|
|
160
|
+
wrong scheme/port or wrong target identity refuses without falling back to public
|
|
161
|
+
DNS. Unknown external origins retain the ordinary transport. The registered
|
|
162
|
+
logical Host replaces caller Host; redirects remain unfollowed. Scoped Gateway
|
|
163
|
+
credentials and selected capability authority remain unchanged. Gateway callbacks
|
|
164
|
+
authorize their original selected endpoint while the Node transport validates and
|
|
165
|
+
pins the private socket. A shared bound of 64 response streams releases at EOF,
|
|
166
|
+
cancellation or abort; failed loads release capacity. There is no hostname cache
|
|
167
|
+
or tenant-registry scan.
|
|
168
|
+
|
|
169
|
+
Discovery, namespace and publication clients receive this injected transport.
|
|
170
|
+
Content callbacks receive it through account-bound ProviderConnections. The real
|
|
171
|
+
separate-container browser journey now reaches catalogue discovery, explicit
|
|
172
|
+
collection publication/installation and rendered Page delivery after restart.
|
|
173
|
+
This replaces the old assumption that a public `.localhost` URL could resolve
|
|
174
|
+
from a Provider container to its own loopback. It does not weaken origin/identity
|
|
175
|
+
checks or expose an operator credential to Edge or browser.
|
|
176
|
+
|
|
177
|
+
## Coherence and request cost
|
|
178
|
+
|
|
179
|
+
A warm context or cached resource still requires one routing HTTP exchange at
|
|
180
|
+
ingress. Successful resolution reads one indexed domain record and one instance
|
|
181
|
+
record, rechecks the ready instance to select its database, then performs four
|
|
182
|
+
indexed cache-metadata reads. An unknown domain needs only the domain read.
|
|
183
|
+
There is no tenant-list scan or Content runtime hydration on this path. Routing
|
|
184
|
+
responses are bounded to 16 KiB. Cold context loading
|
|
185
|
+
resolves once more to fence races, then loads and validates the tenant report and
|
|
186
|
+
selected control capabilities.
|
|
187
|
+
|
|
188
|
+
A broker/report lease check reads the domain and instance again; runtime composition
|
|
189
|
+
then reads the exact current instance record. The ordinary native execution checks
|
|
190
|
+
still run. Invalid lease signatures or expired leases refuse before domain reads.
|
|
191
|
+
|
|
192
|
+
Domain changes and disables affect the next ingress on every Edge. Requests already
|
|
193
|
+
in progress may finish. Resource freshness uses a separate opaque revision in the
|
|
194
|
+
admitted routing response; it grants no authority and does not replace contexts.
|
|
195
|
+
Content, collection, selection and file mutations advance a durable shared clock
|
|
196
|
+
before releasing their write permit. Maintenance release also advances the clock.
|
|
197
|
+
Asynchronous image derivative publication uses the same write fence.
|
|
198
|
+
|
|
199
|
+
Revision reads bracket indexed maintenance and write-permit reads. During a write,
|
|
200
|
+
maintenance, a racing revision change or before the first clock exists, resolution
|
|
201
|
+
returns a unique revision so no existing representation is reused. Invalid persisted
|
|
202
|
+
clocks refuse routing. Failed invalidation keeps the durable permit; even an expired
|
|
203
|
+
permit cannot be treated as proof that a stalled writer is dead. This prioritizes
|
|
204
|
+
freshness over cache reuse and maintenance availability after an uncertain failure.
|
|
205
|
+
|
|
206
|
+
Each Edge purges cached entries and pending fills before handling an ingress whose
|
|
207
|
+
resource revision differs. An ingress resolved after an acknowledged local mutation
|
|
208
|
+
cannot reuse an earlier cache generation. Requests overlapping that mutation may
|
|
209
|
+
finish with the earlier representation. Quiet instances keep ordinary cache HITs.
|
|
210
|
+
External Providers' independently changing data still follows their admitted cache
|
|
211
|
+
policy; this clock tracks writes composed through this official Provider's fences.
|
|
212
|
+
|
|
213
|
+
## Bounded Provider startup
|
|
214
|
+
|
|
215
|
+
Startup streams metadata through indexed Mongo cursors with batches of at most
|
|
216
|
+
50. Retained transition plans are validated individually against admitted
|
|
217
|
+
resources and build support. Idle instances do not open CMS compositions.
|
|
218
|
+
Operation recovery projects one pending identifier per instance, including
|
|
219
|
+
unexpired running work, before opening an affected runtime. Documentation
|
|
220
|
+
preparation is lazy and uses its existing bounded queue. Early exits and refusal
|
|
221
|
+
close cursors. Repository configuration is mandatory persisted instance metadata;
|
|
222
|
+
missing or malformed settings refuse without default substitution or repair.
|
|
223
|
+
|
|
224
|
+
## CLI deployment
|
|
225
|
+
|
|
226
|
+
The CLI applies one Compose project with shared MongoDB, Provider, Caddy and a
|
|
227
|
+
configured pool of Edges. Both CMS images require exact image pins and
|
|
228
|
+
`io.ulvia.hosting-api=1` compatibility evidence. With compatible locally built or
|
|
229
|
+
published images available:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
ulvia configure --domain control.localhost
|
|
233
|
+
ulvia apply --version VERSION
|
|
234
|
+
ulvia status
|
|
235
|
+
ulvia configure --edges 2
|
|
236
|
+
ulvia apply
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Compose removes obsolete Edge services when the pool shrinks. Site creation uses
|
|
240
|
+
Control's hosting contracts and never changes Caddy's static shared destinations.
|
|
241
|
+
`configure` saves desired settings; `apply` deploys them. `start` starts only
|
|
242
|
+
existing containers from `services/deployments/<id>/`, including the exact
|
|
243
|
+
Compose definitions, proxy configuration and private environment. A newer CLI
|
|
244
|
+
does not substitute its own definitions. Interrupted apply/upgrade operations
|
|
245
|
+
retain their target separately from the last successful deployment. `status`
|
|
246
|
+
reports pending settings and observed service/image state.
|
|
247
|
+
Infrastructure mutations share a native process lock whose inode survives reset.
|
|
248
|
+
Health checks use `/readyz`; DNS, domain readiness and certificate readiness remain
|
|
249
|
+
separate from healthy backend services.
|
|
250
|
+
|
|
251
|
+
Mandatory hosting settings live in `services/installation.json`, launch intent
|
|
252
|
+
and applied/unfinished deployment state in `services/stack.json`, and private keys in
|
|
253
|
+
`services/runtime.json`. The initial administrator is written exclusively to
|
|
254
|
+
`services/credentials/control-administrator.json` with mode 0600 in a private
|
|
255
|
+
directory, before runtime keys are committed. Apply prints its path only.
|
|
256
|
+
Missing mandatory settings or keys over existing launch or database state refuse
|
|
257
|
+
without repair. Missing launch state over populated MongoDB or CMS file storage
|
|
258
|
+
refuses before image lookup or credential generation. An interrupted first apply
|
|
259
|
+
retains its recorded target and can resume after Docker has created storage. Ready restarts do not recreate a removed initial
|
|
260
|
+
administrator file. No collection is shipped or installed for Control.
|
|
261
|
+
|
|
262
|
+
## Verification and deployment boundary
|
|
263
|
+
|
|
264
|
+
`bun run verify` runs standard verification, the fresh CLI browser journey,
|
|
265
|
+
delivery measurements and the isolated ACME fixture. Optional integration tests
|
|
266
|
+
have their own explicit image/environment requirements; skipped tests are not
|
|
267
|
+
runtime evidence.
|
|
268
|
+
|
|
269
|
+
The native shared-stack smoke authenticates and configures empty Control, creates
|
|
270
|
+
Registry and a site through an authorized OAuth/MCP client, and explicitly
|
|
271
|
+
publishes test resources into that isolated Registry. Only the test site installs
|
|
272
|
+
a collection and publishes a Page. The smoke checks ordinary-admin Hosting
|
|
273
|
+
refusal, foreign Page/cookie refusal, empty Control/Registry, a full services
|
|
274
|
+
restart without the removed bootstrap credential file, and two warmed shared
|
|
275
|
+
Edges. Both Edge caches must HIT before Page deletion, then return 410 immediately
|
|
276
|
+
after the acknowledged mutation. Separate real-process tests cover OAuth resource
|
|
277
|
+
isolation, fresh domain admission and disabled warmed routes on both Edges.
|
|
278
|
+
|
|
279
|
+
The real upload/isolation fixture checks foreign administrator and owner-token
|
|
280
|
+
refusal on a foreign origin, public file visibility, private refusal and deletion.
|
|
281
|
+
Refused foreign renames preserve both the foreign workspace and the complete
|
|
282
|
+
owner file record. Unit tests cover hard context bounds, coalesced loads,
|
|
283
|
+
streamed-response lifetime, lease renewal and refusal without persistence reads.
|
|
284
|
+
Mongo tests cover exclusive claims, indexed pagination and four point reads for
|
|
285
|
+
the resource clock, with at most one examined key/document each and less than
|
|
286
|
+
256 bytes per loaded clock document. Startup fixtures inspect cursor batches,
|
|
287
|
+
projections, index use and early-close behavior over 101 instances and 100 active
|
|
288
|
+
transitions.
|
|
289
|
+
|
|
290
|
+
Delivery measurements use one shared Edge and distinct local domains. They cover
|
|
291
|
+
cached and uncached Pages/assets, private callbacks through admitted bindings,
|
|
292
|
+
request counts and loaded volume. A cache HIT still performs fresh routing and
|
|
293
|
+
bounded authority metadata reads; the performance guardrails account explicitly
|
|
294
|
+
for that cost. The repeatable measurements are written to
|
|
295
|
+
`artifacts/delivery-performance/latest.json` by the runner. They describe the
|
|
296
|
+
fixture and machine under test, not a general production throughput guarantee.
|
|
297
|
+
|
|
298
|
+
The automated TLS fixture uses two actual Caddy 2.11.9 processes, a shared
|
|
299
|
+
certificate volume and pinned Pebble with real validation. It checks fresh
|
|
300
|
+
issuance, dynamic domain admission, unknown/pending refusal, invalid chains,
|
|
301
|
+
unavailable entrypoints, Host/redirect ports and identical certificate serials
|
|
302
|
+
after proxy recreation. Its upstream is a fixture rather than the CMS Edge;
|
|
303
|
+
the separate native smoke proves the CMS journey. No production certificate
|
|
304
|
+
authority is contacted. Persistent storage and Caddy's certificate management are
|
|
305
|
+
configured, but this test does not simulate a complete long-lived renewal cycle
|
|
306
|
+
or a distributed production certificate-storage backend.
|
|
307
|
+
|
|
308
|
+
Published images and production DNS remain operator deployment inputs. The
|
|
309
|
+
source tests build local images; a passing local journey does not publish them.
|
|
310
|
+
Business quotas, billing, an agent engine and a console collection are outside
|
|
311
|
+
this change.
|
|
@@ -2,19 +2,3 @@ services:
|
|
|
2
2
|
proxy:
|
|
3
3
|
ports:
|
|
4
4
|
- "${ULVIA_BIND_ADDRESS}:${ULVIA_HTTPS_PORT}:443"
|
|
5
|
-
|
|
6
|
-
acme:
|
|
7
|
-
image: nginxproxy/acme-companion:2.8.1@sha256:ccfceb9798b9f6586d47eeeadbb8e185c8897b34e011a2739a9b82d5e92a8b6c
|
|
8
|
-
restart: unless-stopped
|
|
9
|
-
depends_on:
|
|
10
|
-
proxy:
|
|
11
|
-
condition: service_healthy
|
|
12
|
-
volumes_from:
|
|
13
|
-
- proxy
|
|
14
|
-
volumes:
|
|
15
|
-
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
16
|
-
- ${ULVIA_PROXY_ACME_DIR}:/etc/acme.sh
|
|
17
|
-
environment:
|
|
18
|
-
DEFAULT_EMAIL: ${ULVIA_ACME_EMAIL}
|
|
19
|
-
networks:
|
|
20
|
-
- instances
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
services:
|
|
2
2
|
proxy:
|
|
3
|
-
image:
|
|
3
|
+
image: caddy:2.11.9-alpine@sha256:0bbb055bda6793c999bde78b1b5ce3e89f829fb031af2cf50056ea1246559fee
|
|
4
4
|
restart: unless-stopped
|
|
5
|
+
user: "${ULVIA_UID}:${ULVIA_GID}"
|
|
6
|
+
command: ["caddy", "run", "--config", "/etc/caddy/ulvia.json"]
|
|
5
7
|
ports:
|
|
6
8
|
- "${ULVIA_BIND_ADDRESS}:${ULVIA_HTTP_PORT}:80"
|
|
7
9
|
volumes:
|
|
8
|
-
- /
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- ${ULVIA_PROXY_VHOST_DIR}:/etc/nginx/vhost.d
|
|
15
|
-
- ${ULVIA_PROXY_CHALLENGE_DIR}:/usr/share/nginx/html
|
|
16
|
-
- ${ULVIA_PROXY_ACME_DIR}:/etc/acme.sh
|
|
17
|
-
- proxy-cache:/var/cache/nginx
|
|
10
|
+
- ${ULVIA_CADDY_CONFIG}:/etc/caddy/ulvia.json:ro
|
|
11
|
+
- ${ULVIA_PROXY_CERTIFICATES_DIR}:/data
|
|
12
|
+
environment:
|
|
13
|
+
ULVIA_CONFIG_DIGEST: ${ULVIA_CADDY_CONFIG_DIGEST}
|
|
14
|
+
XDG_DATA_HOME: /data
|
|
15
|
+
XDG_CONFIG_HOME: /tmp/config
|
|
18
16
|
networks:
|
|
19
17
|
- instances
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
read_only: true
|
|
19
|
+
tmpfs:
|
|
20
|
+
- /tmp:rw,nosuid,nodev,noexec,size=32m
|
|
21
|
+
cap_drop: [ALL]
|
|
22
|
+
security_opt: [no-new-privileges:true]
|
|
23
|
+
stop_grace_period: 30s
|
|
26
24
|
|
|
27
25
|
mongo:
|
|
26
|
+
ulimits:
|
|
27
|
+
nofile:
|
|
28
|
+
soft: 65536
|
|
29
|
+
hard: 65536
|
|
28
30
|
image: mongo:7.0.37@sha256:d5b3ca8c3f3cdce78d44870dc0871b76d5235e9b2ad4ea6bea5d1fbff8027703
|
|
29
31
|
restart: unless-stopped
|
|
30
32
|
user: "${ULVIA_UID}:${ULVIA_GID}"
|
|
@@ -52,7 +54,9 @@ services:
|
|
|
52
54
|
mongo-provision:
|
|
53
55
|
image: mongo:7.0.37@sha256:d5b3ca8c3f3cdce78d44870dc0871b76d5235e9b2ad4ea6bea5d1fbff8027703
|
|
54
56
|
restart: "no"
|
|
57
|
+
user: "${ULVIA_UID}:${ULVIA_GID}"
|
|
55
58
|
environment:
|
|
59
|
+
HOME: /tmp
|
|
56
60
|
MONGO_INITDB_ROOT_USERNAME: ${ULVIA_MONGO_USERNAME}
|
|
57
61
|
MONGO_INITDB_ROOT_PASSWORD: ${ULVIA_MONGO_PASSWORD}
|
|
58
62
|
MONGO_PROVIDER_USERNAME: ${ULVIA_MONGO_PROVIDER_USERNAME}
|
|
@@ -87,8 +91,6 @@ services:
|
|
|
87
91
|
MODE: PROD
|
|
88
92
|
NODE_ENV: production
|
|
89
93
|
CMS_FILES_DIR: /var/lib/cms/files
|
|
90
|
-
CMS_REPOSITORY_URL: ${CMS_REPOSITORY_URL:-https://repo.ulvia.fr}
|
|
91
|
-
CMS_REPOSITORY_ALLOW_INSECURE_HTTP: "${CMS_REPOSITORY_ALLOW_INSECURE_HTTP:-false}"
|
|
92
94
|
CMS_SESSION_SECRET: ${ULVIA_PROVIDER_SESSION_SECRET}
|
|
93
95
|
CMS_KEK_ACTIVE_ID: ${ULVIA_PROVIDER_KEK_ACTIVE_ID}
|
|
94
96
|
CMS_KEK_RING_JSON: ${ULVIA_PROVIDER_KEK_RING_JSON}
|
|
@@ -97,7 +99,15 @@ services:
|
|
|
97
99
|
ULVIA_PROVIDER_PORT: "5103"
|
|
98
100
|
ULVIA_PROVIDER_PUBLIC_URL: http://ulvia-provider:5103
|
|
99
101
|
ULVIA_PROVIDER_OPERATOR_TOKEN: ${ULVIA_PROVIDER_OPERATOR_TOKEN}
|
|
102
|
+
ULVIA_CONTROL_ORIGIN: ${ULVIA_CONTROL_ORIGIN}
|
|
103
|
+
ULVIA_HOSTING_PROXY_URL: http://proxy:8080
|
|
104
|
+
ULVIA_CONTROL_BOOTSTRAP_FILE: /run/ulvia/control-administrator.json
|
|
105
|
+
ULVIA_EDGE_ROUTING_SECRET: ${ULVIA_EDGE_ROUTING_SECRET}
|
|
106
|
+
ULVIA_HOSTING_MANAGED_SUFFIXES: ${ULVIA_HOSTING_MANAGED_SUFFIXES}
|
|
107
|
+
ULVIA_TLS_ENTRYPOINTS: ${ULVIA_TLS_ENTRYPOINTS}
|
|
108
|
+
ULVIA_TLS_PUBLIC_ADDRESSES: ${ULVIA_TLS_PUBLIC_ADDRESSES}
|
|
100
109
|
volumes:
|
|
110
|
+
- ${ULVIA_CONTROL_CREDENTIALS_DIR}:/run/ulvia:ro
|
|
101
111
|
- type: bind
|
|
102
112
|
source: ${ULVIA_FILES_DIR}
|
|
103
113
|
target: /var/lib/cms/files
|
|
@@ -117,7 +127,7 @@ services:
|
|
|
117
127
|
cap_drop: [ALL]
|
|
118
128
|
security_opt: [no-new-privileges:true]
|
|
119
129
|
healthcheck:
|
|
120
|
-
test: ["CMD", "bun", "-e", "const r=await fetch('http://127.0.0.1:5103/
|
|
130
|
+
test: ["CMD", "bun", "-e", "const r=await fetch('http://127.0.0.1:5103/readyz'); if(r.status!==204) process.exit(1); await r.body?.cancel()"]
|
|
121
131
|
interval: 30s
|
|
122
132
|
timeout: 5s
|
|
123
133
|
retries: 3
|
|
@@ -130,6 +140,3 @@ networks:
|
|
|
130
140
|
internal: true
|
|
131
141
|
instances:
|
|
132
142
|
name: ${ULVIA_INSTANCE_NETWORK}
|
|
133
|
-
|
|
134
|
-
volumes:
|
|
135
|
-
proxy-cache:
|