Skip to content

Commit 5946e8c

Browse files
authored
Merge pull request coollabsio#3738 from riazosama/service-affine
feat: affine service template and logo
2 parents 9f1a637 + 57e646a commit 5946e8c

File tree

2 files changed

+159
-0
lines changed

2 files changed

+159
-0
lines changed

public/svgs/affine.svg

Lines changed: 88 additions & 0 deletions
Loading

templates/compose/affine.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# documentation: https://docs.affine.pro/docs/self-host-affine
2+
# slogan: AFFiNE is an open-source, all-in-one workspace and OS for knowledge management, a Notion/Miro alternative.
3+
# tags: knowledge-management,notion,miro,workspace
4+
# logo: svgs/affine.svg
5+
6+
services:
7+
affine:
8+
image: 'ghcr.io/toeverything/affine-graphql:stable'
9+
command:
10+
- sh
11+
- '-c'
12+
- 'node ./scripts/self-host-predeploy && node ./dist/index.js'
13+
ports:
14+
- ':3010'
15+
- ':5555'
16+
depends_on:
17+
redis:
18+
condition: service_healthy
19+
postgres:
20+
condition: service_healthy
21+
volumes:
22+
- '~/.affine/self-host/config:/root/.affine/config'
23+
- '~/.affine/self-host/storage:/root/.affine/storage'
24+
logging:
25+
driver: json-file
26+
options:
27+
max-size: 1000m
28+
environment:
29+
- SERVICE_FQDN_AFFINE
30+
- 'NODE_OPTIONS="--import=./scripts/register.js"'
31+
- AFFINE_CONFIG_PATH=/root/.affine/config
32+
- REDIS_SERVER_HOST=redis
33+
- 'DATABASE_URL=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-affine}'
34+
- NODE_ENV=production
35+
- AFFINE_SERVER_HOST=$SERVICE_FQDN_AFFINE
36+
- AFFINE_SERVER_EXTERNAL_URL=$SERVICE_FQDN_AFFINE
37+
- MAILER_HOST=$MAILER_HOST
38+
- MAILER_PORT=$MAILER_PORT
39+
- MAILER_USER=$MAILER_USER
40+
- MAILER_PASSWORD=$MAILER_PASSWORD
41+
- MAILER_SENDER=$MAILER_SENDER
42+
redis:
43+
image: redis
44+
volumes:
45+
- '~/.affine/self-host/redis:/data'
46+
healthcheck:
47+
test:
48+
- CMD
49+
- redis-cli
50+
- '--raw'
51+
- incr
52+
- ping
53+
interval: 10s
54+
timeout: 5s
55+
retries: 5
56+
postgres:
57+
image: postgres
58+
volumes:
59+
- '~/.affine/self-host/postgres:/var/lib/postgresql/data'
60+
healthcheck:
61+
test:
62+
- CMD-SHELL
63+
- 'pg_isready -U affine'
64+
interval: 10s
65+
timeout: 5s
66+
retries: 5
67+
environment:
68+
- POSTGRES_USER=$SERVICE_USER_POSTGRES
69+
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
70+
- 'POSTGRES_DB=${POSTGRES_DB:-affine}'
71+
- PGDATA=/var/lib/postgresql/data/pgdata

0 commit comments

Comments
 (0)