An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix affine
peaklabs-dev5ab347da76f7
diff --git a/templates/compose/affine.yaml b/templates/compose/affine.yamlindex c863b80316..ac06ffa49a 100644--- a/templates/compose/affine.yaml+++ b/templates/compose/affine.yaml@@ -2,47 +2,53 @@# slogan: AFFiNE is an open-source, all-in-one workspace and OS for knowledge management, a Notion/Miro alternative.# tags: knowledge-management,notion,miro,workspace# logo: svgs/affine.svg+# port: 3010services:affine:- image: 'ghcr.io/toeverything/affine-graphql:stable'+ image: ghcr.io/toeverything/affine-graphql:stablecommand:- sh- '-c'- 'node ./scripts/self-host-predeploy && node ./dist/index.js'ports:- - ':3010'- - ':5555'+ - ${AFFINE_PORT:-55555}:5555depends_on:redis:- condition: service_healthy+ condition: service_healthypostgres:condition: service_healthyvolumes:- - '~/.affine/self-host/config:/root/.affine/config'- - '~/.affine/self-host/storage:/root/.affine/storage'+ - affine-config:/root/.affine/config+ - affine-storage:/root/.affine/storagelogging:driver: json-fileoptions:max-size: 1000menvironment:- - SERVICE_FQDN_AFFINE- - 'NODE_OPTIONS="--import=./scripts/register.js"'+ - SERVICE_FQDN_AFFINE_3010+ - NODE_OPTIONS=--import=./scripts/register.js- AFFINE_CONFIG_PATH=/root/.affine/config- REDIS_SERVER_HOST=redis- - 'DATABASE_URL=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-affine}'+ - DATABASE_URL=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-affine}- NODE_ENV=production- AFFINE_SERVER_HOST=$SERVICE_FQDN_AFFINE- AFFINE_SERVER_EXTERNAL_URL=$SERVICE_FQDN_AFFINE- - MAILER_HOST=$MAILER_HOST- - MAILER_PORT=$MAILER_PORT- - MAILER_USER=$MAILER_USER- - MAILER_PASSWORD=$MAILER_PASSWORD- - MAILER_SENDER=$MAILER_SENDER+ - MAILER_HOST=${MAILER_HOST}+ - MAILER_PORT=${MAILER_PORT}+ - MAILER_USER=${MAILER_USER}+ - MAILER_PASSWORD=${MAILER_PASSWORD}+ - MAILER_SENDER=${MAILER_SENDER}+ healthcheck:+ test: ["CMD-SHELL", "bash -c ':> /dev/tcp/127.0.0.1/3010' || exit 1"]+ interval: 5s+ timeout: 20s+ retries: 3+redis:image: redisvolumes:- - '~/.affine/self-host/redis:/data'+ - affine-redis-data:/datahealthcheck:test:- CMD@@ -54,9 +60,9 @@ services:timeout: 5sretries: 5postgres:- image: postgres+ image: postgres:16volumes:- - '~/.affine/self-host/postgres:/var/lib/postgresql/data'+ - affine-postgres-data:/var/lib/postgresql/datahealthcheck:test:- CMD-SHELL@@ -65,7 +71,7 @@ services:timeout: 5sretries: 5environment:- - POSTGRES_USER=$SERVICE_USER_POSTGRES- - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES- - 'POSTGRES_DB=${POSTGRES_DB:-affine}'+ - POSTGRES_USER=${SERVICE_USER_POSTGRES}+ - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}+ - POSTGRES_DB=${POSTGRES_DB:-affine}- PGDATA=/var/lib/postgresql/data/pgdata