diff --git a/Cloudreve/docker-compose.yml b/Cloudreve/docker-compose.yml index 61ef06f..a68a2d3 100644 --- a/Cloudreve/docker-compose.yml +++ b/Cloudreve/docker-compose.yml @@ -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: \ No newline at end of file diff --git a/Gitea/docker-compose.yml b/Gitea/docker-compose.yml index 5b9be26..6bbaacc 100644 --- a/Gitea/docker-compose.yml +++ b/Gitea/docker-compose.yml @@ -1,4 +1,3 @@ - services: gitea: image: gitea/gitea:latest @@ -22,6 +21,15 @@ services: ports: - "3001:3000" - "222:22" + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/healthz"] + interval: 30s + timeout: 5s + start_period: 40s + retries: 3 + depends_on: + db: + condition: service_healthy db: image: mysql:8 @@ -37,7 +45,12 @@ services: - gitea volumes: - ./mysql:/var/lib/mysql - + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] + interval: 10s + timeout: 5s + start_period: 30s + retries: 5 networks: gitea: diff --git a/JellyFin/docker-compose.yml b/JellyFin/docker-compose.yml index cc39efe..cb93ceb 100644 --- a/JellyFin/docker-compose.yml +++ b/JellyFin/docker-compose.yml @@ -120,33 +120,6 @@ services: networks: - lingen - qbittorrent: - image: lscr.io/linuxserver/qbittorrent:latest - container_name: qbittorrent - ports: - - "8080:8080" - - "6881:6881" - - "6881:6881/udp" - environment: - - PUID=${PUID} - - PGID=${PGID} - - TZ=${TZ} - - WEBUI_PORT=8080 - volumes: - - ./Radarr/config:/config - - ${TVSHOWS}:/data/tvshows - - ${MOVIES}:/data/movies - - ${DOWNLOADS}:/data/downloads - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8080"] - start_period: 30s - timeout: 5s - interval: 30s - retries: 3 - restart: unless-stopped - networks: - - lingen - flaresolverr: image: ghcr.io/flaresolverr/flaresolverr:latest container_name: flaresolverr @@ -187,7 +160,7 @@ services: cap_drop: - ALL healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:3002/api/health" ] + test: ["CMD-SHELL", "wget -q -O- http://localhost:3000/api/health || exit 1"] interval: 30s timeout: 5s start_period: 10s @@ -211,8 +184,11 @@ services: ports: - "51820:51820/udp" - "8000:8000" + - "8080:8080" # Add qBittorrent WebUI port + - "6881:6881" # Add qBittorrent listening port + - "6881:6881/udp" # Add qBittorrent listening port UDP healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8000/v1/vpn/status"] + test: ["CMD-SHELL", "wget -q -O- http://localhost:8000/v1/vpn/status || exit 1"] start_period: 30s timeout: 5s interval: 30s @@ -221,6 +197,31 @@ services: - lingen restart: unless-stopped + qbittorrent: + image: lscr.io/linuxserver/qbittorrent:latest + container_name: qbittorrent + environment: + - PUID=${PUID} + - PGID=${PGID} + - TZ=${TZ} + - WEBUI_PORT=8080 + volumes: + - ./Radarr/config:/config + - ${TVSHOWS}:/data/tvshows + - ${MOVIES}:/data/movies + - ${DOWNLOADS}:/data/downloads + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080"] + start_period: 30s + timeout: 5s + interval: 30s + retries: 3 + restart: unless-stopped + network_mode: "container:gluetun" + depends_on: + gluetun: + condition: service_healthy + networks: lingen: driver: bridge \ No newline at end of file