From ff599ac7f1c1a58a99464834ec0752f16c0dcf24 Mon Sep 17 00:00:00 2001 From: luulam Date: Tue, 25 Aug 2026 22:01:15 +0700 Subject: [PATCH] update --- docker-compose.gitea.yml | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 docker-compose.gitea.yml diff --git a/docker-compose.gitea.yml b/docker-compose.gitea.yml new file mode 100644 index 000000000..b2c2d9ce1 --- /dev/null +++ b/docker-compose.gitea.yml @@ -0,0 +1,60 @@ +# AFFiNE self-hosted — image built from Dockerfile.all-in-one (MCP 1.1.0) +# +# Usage: +# docker compose up -d +# open http://localhost:3010 +services: + affine: + image: gitea.luulam.dev/luulam/affine:latest + restart: unless-stopped + ports: + - '3010:3010' + # Image entrypoint does not run migrations; do it once on first boot + command: > + sh -c "node node_modules/prisma/build/index.js migrate deploy && + node ./dist/main.js" + environment: + # All-in-one flavor runs sync + graphql + front in one process + - FLAVOR=allinone + - DATABASE_URL=postgresql://affine:affine@postgres:5432/affine + - REDIS_SERVER_HOST=redis + - REDIS_SERVER_PORT=6379 + # Signer for auth tokens (auth) — change in production! + - AFFINE_SECRET=change-me-to-a-random-string + # Blob storage on local disk + - AFFINE_STORAGE_LOCAL=true + volumes: + - affine-storage:/app/storage + - affine-config:/app/config + + postgres: + image: postgres:16 + restart: unless-stopped + environment: + - POSTGRES_USER=affine + - POSTGRES_PASSWORD=affine + - POSTGRES_DB=affine + volumes: + - postgres-data:/var/lib/postgresql/data + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U affine -d affine'] + interval: 5s + timeout: 3s + retries: 20 + + redis: + image: redis:7 + restart: unless-stopped + volumes: + - redis-data:/data + healthcheck: + test: ['CMD', 'redis-cli', 'ping'] + interval: 5s + timeout: 3s + retries: 20 + +volumes: + postgres-data: + redis-data: + affine-storage: + affine-config: