Compare commits

..
1 Commits
Author SHA1 Message Date
Linus Gasser 3c87e66e48 Adapt recipe to Docs v6 (yhub collaboration server)
- the new yhub service needs new initialisation and RSA keys
- SOFT_MIGRATION on by default, add migrate_documents command
- back up the yhub database too
- document the v5 -> v6 upgrade in README and release/next

Following the [C4DT AI Policy](https://git.coopcloud.tech/c4dt/ai-policy/src/branch/main/AI-POLICY.md):

 #LLM_vibe
 #LLM_model Claude Opus 5.5

- [x] I take full responsibility for this code
- [x] I understand every line of this code
- [x] I tested this code thoroughly on my own computer / servers
- [x] None of the commit messages were created using LLMs
- [x] I will participate in any discussion on my own and will not use an LLM for the discussion
2026-10-20 21:31:51 +02:00
7 changed files with 17 additions and 40 deletions
+1 -1
View File
@@ -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
+14 -28
View File
@@ -120,14 +120,14 @@ x-minio-env: &minio-env
services:
app:
image: lasuite/impress-frontend:v6.1.0-1
image: lasuite/impress-frontend:v6.0.1
networks:
- backend
deploy:
labels:
- "traefik.enable=false"
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
- "coop-cloud.${STACK_NAME}.version=2.1.3+v6.1.0-1"
- "coop-cloud.${STACK_NAME}.version=0.4.4+v5.6.1"
user: "${DOCKER_USER:-1000}"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
@@ -137,7 +137,7 @@ services:
start_period: 10s
backend:
image: lasuite/impress-backend:v6.1.1
image: lasuite/impress-backend:v6.0.1
networks:
- backend
environment:
@@ -172,7 +172,7 @@ services:
- jwt_pk
celery:
image: lasuite/impress-backend:v6.1.1
image: lasuite/impress-backend:v6.0.1
networks:
- backend
healthcheck:
@@ -203,7 +203,7 @@ services:
# Collaboration server: serves the websocket and holds the document content
yhub:
image: lasuite/impress-yhub:v6.1.1
image: lasuite/impress-yhub:v6.0.1
networks:
- backend
environment: *yhub-env
@@ -214,24 +214,10 @@ services:
timeout: 5s
retries: 20
start_period: 30s
# Since v6.1.0 the image is distroless (no shell), so this is plain node:
# - 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.
entrypoint:
- node
- -e
- >-
const fs = require('fs'), cp = require('child_process');
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
# The server never creates its schema: run the idempotent init-db before every start
entrypoint: >
sh -c "export POSTGRES=\"postgres://docs:$$(node -e 'process.stdout.write(encodeURIComponent(require(\"fs\").readFileSync(\"/run/secrets/postgres_p\",\"utf8\").trim()))')@db:5432/yhub\" && node node_modules/@y/hub/bin/init-db.js && exec /usr/local/bin/entrypoint \"$$@\"" --
command: ["node", "--import", "./dist/sentry.js", "dist/server.js"]
secrets:
- postgres_p
- y_api_key
@@ -241,7 +227,7 @@ services:
# Valkey of yhub: holds updates not yet persisted to postgres, so it is a store, not a cache
yhub-valkey:
image: valkey/valkey:9.2.1-alpine
image: valkey/valkey:8.1.10-alpine
command: ["valkey-server", "--maxmemory-policy", "volatile-lru", "--appendonly", "yes", "--appendfsync", "everysec"]
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
@@ -258,7 +244,7 @@ services:
# Conversion service only since v6 (no longer serves the collaboration)
y-provider:
image: lasuite/impress-y-provider:v6.1.1
image: lasuite/impress-y-provider:v6.0.1
networks:
- backend
healthcheck:
@@ -316,7 +302,7 @@ services:
- postgres_p
redis:
image: redis:8.12.0
image: redis:8.10.2
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 15s
@@ -357,7 +343,7 @@ services:
- minio_ru
web:
image: nginx:1.31.10
image: nginx:1.31.7
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8083"]
interval: 15s
@@ -443,4 +429,4 @@ secrets:
name: ${STACK_NAME}_y_api_key_${SECRET_Y_API_KEY_VERSION}
email_pass:
external: true
name: ${STACK_NAME}_email_pass_${SECRET_EMAIL_PASS_VERSION}
name: ${STACK_NAME}_email_pass_${SECRET_EMAIL_PASS_VERSION}
+2 -8
View File
@@ -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
View File
@@ -1 +0,0 @@
Upgrade valkey to latest version
-1
View File
@@ -1 +0,0 @@
Latest images need different handling, but you should not need to change anything!
-1
View File
@@ -1 +0,0 @@
Patches nginx image