fix(affinepro): update to current AFFiNE images

The template pinned ghcr.io/toeverything/affine-graphql:stable-780dd83,
an ephemeral per-commit tag on the old image name that has since been
removed from GHCR, so the template could no longer pull and deploy.

- Switch both app and migration services to ghcr.io/toeverything/affine:stable,
  the rolling stable tag recommended by the official self-host compose,
  so the template no longer rots when per-commit tags are garbage-collected
- Move postgres to pgvector/pgvector:pg16 and set AFFINE_INDEXER_ENABLED=false,
  matching the current upstream self-host compose requirements
- Add postgres/redis healthchecks and proper depends_on conditions so the
  self-host-predeploy migration job runs only once the database is ready,
  and the server starts only after migrations complete successfully

Closes #777

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Mauricio Siu
2026-07-14 10:55:42 -06:00
parent 17efd705a4
commit 59770d4ae8
2 changed files with 29 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
version: "3.8"
services:
affinepro:
image: ghcr.io/toeverything/affine-graphql:stable-780dd83
image: ghcr.io/toeverything/affine:stable
restart: unless-stopped
ports:
- 3010
@@ -12,6 +12,7 @@ services:
- REDIS_SERVER_HOST=redis
- REDIS_SERVER_PASSWORD=${REDIS_PASSWORD}
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/affinepro
- AFFINE_INDEXER_ENABLED=false
- AFFINE_SERVER_HOST=${DOMAIN}
- MAILER_HOST=${MAILER_HOST}
- MAILER_PORT=${MAILER_PORT}
@@ -19,16 +20,21 @@ services:
- MAILER_PASSWORD=${MAILER_PASSWORD}
- MAILER_SENDER=${MAILER_SENDER}
depends_on:
- db
- redis
db:
condition: service_healthy
redis:
condition: service_healthy
migration:
condition: service_completed_successfully
migration:
image: ghcr.io/toeverything/affine-graphql:stable-780dd83
command: node ./scripts/self-host-predeploy.js
image: ghcr.io/toeverything/affine:stable
command: ["sh", "-c", "node ./scripts/self-host-predeploy.js"]
environment:
- REDIS_SERVER_HOST=redis
- REDIS_SERVER_PASSWORD=${REDIS_PASSWORD}
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/affinepro
- AFFINE_INDEXER_ENABLED=false
- AFFINE_SERVER_HOST=${DOMAIN}
- MAILER_HOST=${MAILER_HOST}
- MAILER_PORT=${MAILER_PORT}
@@ -39,17 +45,25 @@ services:
- affine-storage:/root/.affine/storage
- affine-config:/root/.affine/config
depends_on:
- db
- redis
db:
condition: service_healthy
redis:
condition: service_healthy
db:
image: postgres:15-alpine
image: pgvector/pgvector:pg16
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=affinepro
- POSTGRES_INITDB_ARGS=--data-checksums
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "affinepro"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
@@ -57,9 +71,14 @@ services:
command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- redis-data:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli -a '${REDIS_PASSWORD}' ping | grep PONG"]
interval: 10s
timeout: 5s
retries: 5
volumes:
affine-storage: {}
affine-config: {}
postgres-data: {}
redis-data: {}
redis-data: {}

View File

@@ -1,7 +1,7 @@
{
"id": "affinepro",
"name": "Affine Pro",
"version": "stable-780dd83",
"version": "stable",
"description": "Affine Pro is a modern, self-hosted platform designed for collaborative content creation and project management. It offers an intuitive interface, seamless real-time collaboration, and powerful tools for organizing tasks, notes, and ideas.",
"logo": "logo.png",
"links": {