Files
Arch1Panel/apps/affine/0.26.3/docker-compose.yml

99 lines
2.4 KiB
YAML
Raw Normal View History

2025-07-07 18:16:31 +08:00
services:
affine:
2026-02-27 22:36:20 +08:00
image: ghcr.io/toeverything/affine:0.26.3
2025-07-07 18:16:31 +08:00
container_name: ${CONTAINER_NAME}
ports:
- ${PANEL_APP_PORT_HTTP}:3010
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
affine_migration:
condition: service_completed_successfully
volumes:
- ${UPLOAD_LOCATION}:/root/.affine/storage
- ${CONFIG_LOCATION}:/root/.affine/config
environment:
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${DB_DATABASE:-affine}
- AFFINE_INDEXER_ENABLED=false
networks:
2025-08-12 10:09:14 +08:00
- 1panel-network
2025-07-07 18:16:31 +08:00
restart: always
labels:
2025-08-12 10:09:14 +08:00
createdBy: Apps
2025-07-07 18:16:31 +08:00
affine_migration:
2026-02-28 05:32:27 +08:00
image: ghcr.io/toeverything/affine:0.26.3
2025-07-07 18:16:31 +08:00
container_name: ${CONTAINER_NAME}_migration_job
volumes:
- ${UPLOAD_LOCATION}:/root/.affine/storage
- ${CONFIG_LOCATION}:/root/.affine/config
2025-08-12 10:09:14 +08:00
command:
- sh
- -c
- node ./scripts/self-host-predeploy.js
2025-07-07 18:16:31 +08:00
networks:
2025-08-12 10:09:14 +08:00
- 1panel-network
2025-07-07 18:16:31 +08:00
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
labels:
2025-08-12 10:09:14 +08:00
createdBy: Apps
skipStatusCheck: 'true'
restart: 'no'
2025-07-07 18:16:31 +08:00
redis:
image: redis
container_name: ${CONTAINER_NAME}_redis
healthcheck:
2025-08-12 10:09:14 +08:00
test:
- CMD
- redis-cli
- --raw
- incr
- ping
2025-07-07 18:16:31 +08:00
interval: 10s
timeout: 5s
retries: 5
networks:
2025-08-12 10:09:14 +08:00
- 1panel-network
2025-07-07 18:16:31 +08:00
labels:
2025-08-12 10:09:14 +08:00
createdBy: Apps
2025-07-07 18:16:31 +08:00
restart: always
postgres:
image: pgvector/pgvector:pg16
container_name: ${CONTAINER_NAME}_postgres
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
networks:
2025-08-12 10:09:14 +08:00
- 1panel-network
2025-07-07 18:16:31 +08:00
labels:
2025-08-12 10:09:14 +08:00
createdBy: Apps
2025-07-07 18:16:31 +08:00
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE:-affine}
2025-08-12 10:09:14 +08:00
POSTGRES_INITDB_ARGS: --data-checksums
2025-07-07 18:16:31 +08:00
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test:
2025-08-12 10:09:14 +08:00
- CMD
- pg_isready
- -U
- ${DB_USERNAME}
- -d
- ${DB_DATABASE:-affine}
2025-07-07 18:16:31 +08:00
interval: 10s
timeout: 5s
retries: 5
restart: always
networks:
1panel-network:
2025-08-12 10:09:14 +08:00
external: true