Extra health checks and route qbittorrent through VPN
This commit is contained in:
committed by
shaun collins
parent
a0530fb095
commit
aa064c3dbc
@@ -3,8 +3,10 @@ services:
|
||||
image: cloudreve/cloudreve:latest
|
||||
container_name: cloudreve-backend
|
||||
depends_on:
|
||||
- postgresql
|
||||
- redis
|
||||
postgresql:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5212:5212"
|
||||
@@ -19,11 +21,14 @@ services:
|
||||
- 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:
|
||||
# Best practice: Pin to major version.
|
||||
# NOTE: For major version jumps:
|
||||
# backup & consult https://www.postgresql.org/docs/current/pgupgrade.html
|
||||
image: postgres:17
|
||||
container_name: postgresql
|
||||
restart: unless-stopped
|
||||
@@ -33,6 +38,12 @@ services:
|
||||
- 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
|
||||
@@ -40,8 +51,13 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
start_period: 30s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
# backend_data:
|
||||
database_postgres:
|
||||
redis_data:
|
||||
Reference in New Issue
Block a user