Affine를 Windows Docker Desktop C드라이브저장하는 Docker compose.yml 소스입니다.
설치하는 명령어는 docker-compose up -d
업그레이드는 https://docs.affine.pro/self-host-affine/install/upgrade 참조하고 데이타가 소실될수 있으니 미리백업하고 진행이 필요합니다.
docker compose pull
docker compose up -d
Docker-compose.yml
services:
affine:
image: ghcr.io/toeverything/affine:${AFFINE_REVISION:-stable}
container_name: AFFINE
ports:
- "${PORT:-3010}:3010"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
affine_migration:
condition: service_completed_successfully
volumes:
- "${CONFIG_LOCATION}:/root/.affine/config:rw"
- "${UPLOAD_LOCATION}:/root/.affine/storage:rw"
env_file:
- .env
environment:
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${DB_DATABASE}
restart: unless-stopped
affine_migration:
image: ghcr.io/toeverything/affine:${AFFINE_REVISION:-stable}
container_name: affine_migration_job
volumes:
- "${CONFIG_LOCATION}:/root/.affine/config:rw"
- "${UPLOAD_LOCATION}:/root/.affine/storage:rw"
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}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
redis:
image: redis:latest
container_name: AFFINE-REDIS
restart: on-failure:5
volumes:
- "${REDIS_DATA_LOCATION}:/data:rw"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
postgres:
image: postgres:17
container_name: AFFINE-DB
restart: on-failure:5
volumes:
- "${DB_DATA_LOCATION}:/var/lib/postgresql/data:rw"
healthcheck:
test: ["CMD", "pg_isready", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"]
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_DB: ${DB_DATABASE}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
.env
# select a revision to deploy, available values: stable, beta, canary AFFINE_REVISION=stable # set the port for the server container it will expose the server on PORT=3010 # set the host for the server for outgoing links AFFINE_SERVER_HTTPS=true AFFINE_SERVER_HOST=affine.yourdomain.com # or # AFFINE_SERVER_EXTERNAL_URL=https://affine.yourdomain.com DB_DATA_LOCATION=C:/affine/db UPLOAD_LOCATION=C:/affine/storage CONFIG_LOCATION=C:/affine/config REDIS_DATA_LOCATION=C:/affine/redis # database credentials DB_USERNAME=affine DB_PASSWORD=macsplex DB_DATABASE=affine
--------------------------------------------------------------------------------------광고(Advertising)--------------------------------------------------------------------------------------------------------