63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
services:
|
|
cloudreve:
|
|
image: cloudreve/cloudreve:latest
|
|
container_name: cloudreve-backend
|
|
depends_on:
|
|
postgresql:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5212:5212"
|
|
- "6888:6888"
|
|
- "6888:6888/udp"
|
|
environment:
|
|
- CR_CONF_Database.Type=postgres
|
|
- CR_CONF_Database.Host=postgresql
|
|
- CR_CONF_Database.User=cloudreve
|
|
- CR_CONF_Database.Name=cloudreve
|
|
- CR_CONF_Database.Port=5432
|
|
- CR_CONF_Redis.Server=redis:6379
|
|
volumes:
|
|
- "${DATA_PATH}:/cloudreve/data"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5212/api/v3/site/ping"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
start_period: 40s
|
|
retries: 3
|
|
|
|
postgresql:
|
|
image: postgres:17
|
|
container_name: postgresql
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=cloudreve
|
|
- POSTGRES_DB=cloudreve
|
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
|
volumes:
|
|
- database_postgres:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U cloudreve"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
start_period: 30s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:latest
|
|
container_name: redis
|
|
restart: unless-stopped
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
start_period: 30s
|
|
retries: 5
|
|
|
|
volumes:
|
|
database_postgres:
|
|
redis_data: |