Actualiser affine.yaml
This commit is contained in:
116
affine.yaml
116
affine.yaml
@@ -1,60 +1,76 @@
|
||||
name: affine
|
||||
services:
|
||||
postgres:
|
||||
image: pgvector/pgvector:pg17
|
||||
container_name: affine_db
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
affine:
|
||||
image: ghcr.io/toeverything/affine:${AFFINE_REVISION:-stable}
|
||||
container_name: affine_server_1
|
||||
ports:
|
||||
- '${PORT:-3010}:3010'
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
affine_migration:
|
||||
condition: service_completed_successfully
|
||||
volumes:
|
||||
- affine_db_data:/var/lib/postgresql/data
|
||||
# custom configurations
|
||||
- ${UPLOAD_LOCATION}:/root/.affine/storage
|
||||
- ${CONFIG_LOCATION}:/root/.affine/config
|
||||
#env_file:
|
||||
# - .env
|
||||
environment:
|
||||
- REDIS_SERVER_HOST=redis
|
||||
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${DB_DATABASE:-affine}
|
||||
- AFFINE_INDEXER_ENABLED=false
|
||||
restart: unless-stopped
|
||||
|
||||
affine_migration:
|
||||
image: ghcr.io/toeverything/affine:${AFFINE_REVISION:-stable}
|
||||
container_name: affine_migration_job
|
||||
volumes:
|
||||
# custom configurations
|
||||
- ${UPLOAD_LOCATION}:/root/.affine/storage
|
||||
- ${CONFIG_LOCATION}:/root/.affine/config
|
||||
command: ['sh', '-c', 'node ./scripts/self-host-predeploy.js']
|
||||
# env_file:
|
||||
# - .env
|
||||
environment:
|
||||
- REDIS_SERVER_HOST=redis
|
||||
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${DB_DATABASE:-affine}
|
||||
- AFFINE_INDEXER_ENABLED=false
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
container_name: affine_redis
|
||||
volumes:
|
||||
- affine_redis_data:/data
|
||||
image: redis
|
||||
container_name: affine_redis_1
|
||||
healthcheck:
|
||||
test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping']
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
affine:
|
||||
image: ghcr.io/toeverything/affine:canary
|
||||
container_name: affine_app
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
ports:
|
||||
- "${AFFINE_PORT:-3010}:3010"
|
||||
postgres:
|
||||
image: pgvector/pgvector:pg16
|
||||
container_name: affine_postgres
|
||||
volumes:
|
||||
- affine_config:/root/.affine/config
|
||||
- affine_storage:/root/.affine/storage
|
||||
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
|
||||
environment:
|
||||
# Config AFFiNE
|
||||
AFFINE_REVISION: ${AFFINE_REVISION:-canary}
|
||||
AFFINE_INDEXER_ENABLED: ${AFFINE_INDEXER_ENABLED:-false}
|
||||
PORT: 3010
|
||||
AFFINE_SERVER_HTTPS: ${AFFINE_SERVER_HTTPS:-true}
|
||||
AFFINE_SERVER_EXTERNAL_URL: ${AFFINE_EXTERNAL_URL}
|
||||
AFFINE_DISABLE_DEMO_WORKSPACE: true
|
||||
|
||||
|
||||
# SMTP / Mailer
|
||||
MAILER_HOST: ${MAILER_HOST}
|
||||
MAILER_PORT: ${MAILER_PORT}
|
||||
MAILER_USER: ${MAILER_USER}
|
||||
MAILER_PASSWORD: ${MAILER_PASSWORD}
|
||||
MAILER_SENDER: ${MAILER_SENDER}
|
||||
|
||||
# Backend
|
||||
REDIS_SERVER_HOST: redis
|
||||
DATABASE_URL: ${DATABASE_URL}
|
||||
NODE_ENV: production
|
||||
AFFINE_ADMIN_EMAIL: ${AFFINE_ADMIN_EMAIL}
|
||||
AFFINE_ADMIN_PASSWORD: ${AFFINE_ADMIN_PASSWORD}
|
||||
POSTGRES_USER: ${DB_USERNAME}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_DB: ${DB_DATABASE:-affine}
|
||||
POSTGRES_INITDB_ARGS: '--data-checksums'
|
||||
# you better set a password for you database
|
||||
# or you may add 'POSTGRES_HOST_AUTH_METHOD=trust' to ignore postgres security policy
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
healthcheck:
|
||||
test:
|
||||
['CMD', 'pg_isready', '-U', "${DB_USERNAME}", '-d', "${DB_DATABASE:-affine}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
affine_db_data:
|
||||
affine_redis_data:
|
||||
affine_config:
|
||||
affine_storage:
|
||||
|
||||
Reference in New Issue
Block a user