-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (62 loc) · 2.03 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
services:
affine:
image: ghcr.io/toeverything/affine-graphql:latest
container_name: toeverything-affine-graphql-latest
restart: always
hostname: affine
pull_policy: always
command:
['sh', '-c', 'node ./scripts/self-host-predeploy && node ./dist/index.js']
ports:
- '172.17.0.1:3010:3010'
- '172.17.0.1:5555:5555'
volumes:
- /var/lib/srv/$USER/docker/toeverything/affine/latest/rootfs/data/affine:/root/.affine/storage
- /var/lib/srv/$USER/docker/toeverything/affine/latest/rootfs/config/affine:/root/.affine/config
environment:
- REDIS_SERVER_HOST=redis
- NODE_OPTIONS="--import=./scripts/register.js"
- AFFINE_CONFIG_PATH=/root/.affine/config
- DATABASE_URL=postgres://affine:h6oAV3gF0aZUPtR@postgres:5432/affine
- AFFINE_ADMIN_EMAIL=${AFFINE_ADMIN_EMAIL:-admin@$HOSTNAME}
- AFFINE_ADMIN_PASSWORD=${AFFINE_ADMIN_PASSWORD:-password}
- TELEMETRY_ENABLE=false
- NODE_ENV=production
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
logging:
driver: 'json-file'
options:
max-size: '1000m'
redis:
image: redis:latest
container_name: toeverything-affine-redis-latest
restart: always
volumes:
- /var/lib/srv/$USER/docker/toeverything/affine/latest/rootfs/data/db/redis:/data
healthcheck:
test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping']
interval: 10s
timeout: 5s
retries: 5
postgres:
image: postgres:latest
container_name: toeverything-affine-postgres-latest
restart: always
volumes:
- /var/lib/srv/$USER/docker/toeverything/affine/latest/rootfs/data/db/postgres:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U affine']
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: affine
POSTGRES_PASSWORD: h6oAV3gF0aZUPtR
POSTGRES_DB: affine
PGDATA: /var/lib/postgresql/data/pgdata
networks:
affine: