Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f69a63314 |
@@ -1,5 +1,4 @@
|
||||
TYPE=lasuite-docs
|
||||
|
||||
DOMAIN=lasuite-docs.example.com
|
||||
|
||||
## Domain aliases
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Set any config versions here
|
||||
# Docs: https://docs.coopcloud.tech/maintainers/handbook/#manage-configs
|
||||
export ABRA_ENTRYPOINT_VERSION=v6
|
||||
export NGINX_CONF_VERSION=v5
|
||||
export NGINX_CONF_VERSION=v4
|
||||
export PG_BACKUP_VERSION=v5
|
||||
export MINIO_INITIALIZE_VERSION=v2
|
||||
export MIGRATE_VERSION=v1
|
||||
|
||||
+21
-29
@@ -122,14 +122,14 @@ x-minio-env: &minio-env
|
||||
|
||||
services:
|
||||
app:
|
||||
image: lasuite/impress-frontend:v6.1.0-1
|
||||
image: lasuite/impress-frontend:v6.1.0
|
||||
networks:
|
||||
- backend
|
||||
deploy:
|
||||
labels:
|
||||
- "traefik.enable=false"
|
||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
||||
- "coop-cloud.${STACK_NAME}.version=2.1.1+v6.1.0-1"
|
||||
- "coop-cloud.${STACK_NAME}.version=2.0.0+v6.0.4"
|
||||
user: "${DOCKER_USER:-1000}"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
||||
@@ -154,7 +154,7 @@ services:
|
||||
user: "${DOCKER_USER:-1000}"
|
||||
command: ["gunicorn", "-c", "/usr/local/etc/gunicorn/impress.py", "impress.wsgi:application"]
|
||||
entrypoint: >
|
||||
sh -c "while [ ! -r /keys/jwt.pem ]; do sleep 1; done; if [ \"$$AUTO_MIGRATIONS\" = \"true\" ]; then /migrate.sh; fi && exec /abra-entrypoint.sh /usr/local/bin/entrypoint \"$$@\"" --
|
||||
sh -c "while [ ! -s /keys/jwt.pem ]; do sleep 1; done; if [ \"$$AUTO_MIGRATIONS\" = \"true\" ]; then /migrate.sh; fi && exec /abra-entrypoint.sh /usr/local/bin/entrypoint \"$$@\"" --
|
||||
volumes:
|
||||
- jwt_keys:/keys:ro
|
||||
configs:
|
||||
@@ -189,7 +189,7 @@ services:
|
||||
environment:
|
||||
<<: [*common-env, *postgres-env, *yprovider-env]
|
||||
entrypoint: >
|
||||
sh -c "while [ ! -r /keys/jwt.pem ]; do sleep 1; done; exec /abra-entrypoint.sh /usr/local/bin/entrypoint \"$$@\"" --
|
||||
sh -c "while [ ! -s /keys/jwt.pem ]; do sleep 1; done; exec /abra-entrypoint.sh /usr/local/bin/entrypoint \"$$@\"" --
|
||||
volumes:
|
||||
- jwt_keys:/keys:ro
|
||||
configs:
|
||||
@@ -219,30 +219,22 @@ services:
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
start_period: 30s
|
||||
# Since v6.1.0 the image is distroless (no shell), so this is plain node:
|
||||
# - wait for the RSA key the jwt-keys sidecar generates into the shared volume
|
||||
# - POSTGRES has no _FILE variant: build it from the postgres_p secret
|
||||
# - the server never creates its schema: run the idempotent init-db
|
||||
# (dist/init-db.js retries while postgres isn't up yet) before every start
|
||||
# - then load sentry and the server in this process, like the image's
|
||||
# `node --import ./dist/sentry.js dist/server.js`
|
||||
# No `$` in here, or compose would interpolate it.
|
||||
# The server never creates its schema: run the idempotent init-db before every start.
|
||||
# The v6.1.0 yhub image is distroless (no shell), so the init-db + server chain is a
|
||||
# plain Node script: wait for the RSA key, build POSTGRES from the secret, init-db,
|
||||
# then exec the server exactly as the image's default Cmd would.
|
||||
entrypoint:
|
||||
- node
|
||||
- -e
|
||||
- >-
|
||||
const fs = require('fs'), cp = require('child_process');
|
||||
const key = '/keys/yhub-jwt.pem';
|
||||
const hasKey = () => { try { fs.accessSync(key, fs.constants.R_OK); return true; } catch { return false; } };
|
||||
const sab = new Int32Array(new SharedArrayBuffer(4));
|
||||
for (let i = 0; i < 300 && !hasKey(); i++) Atomics.wait(sab, 0, 0, 1000);
|
||||
if (!hasKey()) { console.error('yhub: RSA key never appeared in /keys'); process.exit(1); }
|
||||
const pw = encodeURIComponent(fs.readFileSync('/run/secrets/postgres_p', 'utf8').trim());
|
||||
process.env.POSTGRES = 'postgres://docs:' + pw + '@db:5432/yhub';
|
||||
const r = cp.spawnSync(process.execPath, ['/app/dist/init-db.js'], { stdio: 'inherit' });
|
||||
if (r.status !== 0) process.exit(r.status ?? 1);
|
||||
import('/app/dist/sentry.js').then(() => import('/app/dist/server.js'));
|
||||
# The image's CMD gets appended to `node -e` as extra argv and is ignored
|
||||
- /nodejs/bin/node
|
||||
- "-e"
|
||||
- |-
|
||||
const fs = require("fs"), cp = require("child_process");
|
||||
const key = "/keys/yhub-jwt.pem";
|
||||
const sleep = () => { Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 1000); };
|
||||
for (let i = 0; i < 300 && !(fs.existsSync(key) && fs.statSync(key).size > 0); i++) sleep();
|
||||
if (!(fs.existsSync(key) && fs.statSync(key).size > 0)) { console.error("yhub: RSA key never appeared in /keys"); process.exit(1); }
|
||||
process.env.POSTGRES = "postgres://docs:" + encodeURIComponent(fs.readFileSync("/run/secrets/postgres_p", "utf8").trim()) + "@db:5432/yhub";
|
||||
cp.execFileSync(process.execPath, ["node_modules/@y/hub/bin/init-db.js"], { stdio: "inherit" });
|
||||
cp.execFileSync(process.execPath, ["--import", "./dist/sentry.js", "dist/server.js"], { stdio: "inherit" });
|
||||
volumes:
|
||||
- jwt_keys:/keys:ro
|
||||
secrets:
|
||||
@@ -289,11 +281,11 @@ services:
|
||||
- y_api_key
|
||||
|
||||
docspec:
|
||||
image: ghcr.io/docspec/api:1.21.11
|
||||
image: ghcr.io/docspec/api:1.21.4
|
||||
networks:
|
||||
- backend
|
||||
healthcheck:
|
||||
# Use 127.0.0.1 (not localhost) for this healthcheck
|
||||
# Use 127.0.0.1, which is required instead of localhost for this healthcheck
|
||||
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:3000/health"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
|
||||
+2
-8
@@ -13,12 +13,6 @@ server {
|
||||
# Disables server version feedback on pages and in headers
|
||||
server_tokens off;
|
||||
|
||||
# Docker's embedded DNS. Used to resolve yhub per request (via a variable
|
||||
# in proxy_pass) so nginx doesn't refuse to start while yhub isn't healthy
|
||||
# yet: swarm only publishes a service's DNS name once it has a healthy task.
|
||||
resolver 127.0.0.11 valid=10s ipv6=off;
|
||||
set $yhub_upstream http://{{ env "STACK_NAME" }}_yhub:3002;
|
||||
|
||||
location @proxy_to_docs_backend {
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $http_host;
|
||||
@@ -68,7 +62,7 @@ server {
|
||||
proxy_set_header Connection "Upgrade";
|
||||
|
||||
# Collaboration server
|
||||
proxy_pass $yhub_upstream;
|
||||
proxy_pass http://{{ env "STACK_NAME" }}_yhub:3002;
|
||||
|
||||
# Set appropriate timeout for WebSocket
|
||||
proxy_read_timeout 86400;
|
||||
@@ -82,7 +76,7 @@ server {
|
||||
|
||||
# Document routes (http fallback, history) and the public keys of yhub
|
||||
location ~ ^/collaboration/(ydoc|activity|changeset|rollback|jwks)/ {
|
||||
proxy_pass $yhub_upstream;
|
||||
proxy_pass http://{{ env "STACK_NAME" }}_yhub:3002;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Origin $http_origin;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Latest images need different handling, but you should not need to change anything!
|
||||
@@ -1 +0,0 @@
|
||||
Patches nginx image
|
||||
+16
-13
@@ -1,15 +1,18 @@
|
||||
Make v6.1.0 deployable without manual keys; docspec 1.21.11.
|
||||
Fix upstream main + make v6.1.0 deployable; runtime RSA keys + docspec 1.21.4.
|
||||
|
||||
- Docspec moves to the Rust `ghcr.io/docspec/api:1.21.11` (port 3000), which
|
||||
Docs >= 5.7 expects; the archived Elixir `ghcr.io/docspecio/api` (port 4000)
|
||||
is removed. Changelog: https://github.com/docspec/docspec/releases
|
||||
(1.21.4 -> 1.21.11 is within-major, no breaking changes).
|
||||
- The two RSA JWT keys (backend <-> yhub) are now generated at runtime by a
|
||||
`jwt-keys` sidecar (`node:22-alpine`) into the `jwt_keys` volume; the backend,
|
||||
celery and yhub wait for their file. `SECRET_JWT_PK_VERSION` /
|
||||
`SECRET_YHUB_JWT_PK_VERSION` are gone -- fresh installs deploy without manual
|
||||
`abra app secret insert` of PEMs, and upgrades regenerate transparently.
|
||||
- The distroless yhub `init-db` entrypoint and valkey 9.2.0 are unchanged from
|
||||
upstream main.
|
||||
- Upstream `compose.yml` at `34e6c91` contains unresolved merge-conflict markers
|
||||
(valkey 9.1.4 vs 9.1.3) around the `yhub-valkey` service — abra FATA
|
||||
`yaml: line 230: could not find expected ':'`. Resolved here to a single
|
||||
`yhub-valkey` bumped to `valkey/valkey:9.2.0-alpine`.
|
||||
- The yhub v6.1.0 image is distroless (no shell, no /usr/local/bin/entrypoint), so
|
||||
upstream's renovate bump broke the yhub service entirely. The entrypoint is now a
|
||||
plain `node -e` script: wait for the RSA key, build POSTGRES from the secret, run
|
||||
the idempotent init-db, then exec the server (same default Cmd).
|
||||
- The two RSA JWT keys (backend ↔ yhub) are now generated at runtime by a `jwt-keys`
|
||||
sidecar (`node:22-alpine`) into the `jwt_keys` volume; consumers wait for their
|
||||
file. `SECRET_JWT_PK_VERSION`/`SECRET_YHUB_JWT_PK_VERSION` are gone — fresh
|
||||
installs deploy without manual `abra app secret insert` of PEMs.
|
||||
- Docspec moves to the Rust `ghcr.io/docspec/api:1.21.4` (port 3000), which Docs
|
||||
>= 5.7 expects; the archived Elixir `ghcr.io/docspecio/api` (port 4000) is removed.
|
||||
|
||||
Recommended release: `abra recipe release lasuite-docs -z`
|
||||
Recommended release: `abra recipe release lasuite-docs -y`
|
||||
|
||||
Reference in New Issue
Block a user