added healthchecks and removed exposed password from compose.yaml

This commit is contained in:
2026-07-24 12:03:33 +00:00
parent 1df84fe52a
commit 499bf411b0
7 changed files with 83 additions and 5 deletions
+6
View File
@@ -19,6 +19,12 @@ services:
options:
max-size: "50m"
max-file: "3"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
synapse-foxgirls:
image: matrixdotorg/synapse:latest
+10
View File
@@ -29,6 +29,7 @@ services:
networks:
- reverse_proxy_default
- postgre-general
logging:
driver: "json-file"
@@ -39,6 +40,15 @@ services:
ports:
- "2001:22"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/api/healthz || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
networks:
reverse_proxy_default:
external: true
postgre-general:
external: true
+6
View File
@@ -13,6 +13,12 @@ services:
options:
max-size: "50m"
max-file: "3"
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/', timeout=5)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
networks:
reverse_proxy_default:
external: true
+26 -1
View File
@@ -2,6 +2,7 @@
services:
nextcloud-app:
build: .
image: local-nextcloud
container_name: nextcloud_app
restart: unless-stopped
volumes:
@@ -31,6 +32,12 @@ services:
- postgre-general
- nextcloud-network
- reverse_proxy_default
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:80/status.php | grep -q '\"installed\":true' || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
nextcloud-redis:
image: redis:alpine # Essential for file locking, uses almost no RAM (~20MB)
@@ -39,9 +46,16 @@ services:
command: redis-server --requirepass ${REDIS_PASS}
networks:
- nextcloud-network
healthcheck:
test: ["CMD-SHELL", "redis-cli -a ${REDIS_PASS} ping | grep PONG || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 5s
nextcloud-cron:
image: nextcloud:latest
build: .
image: local-nextcloud
container_name: nextcloud_cron
restart: unless-stopped
volumes:
@@ -52,6 +66,17 @@ services:
networks:
- nextcloud-network
- postgre-general
healthcheck:
test: ["CMD-SHELL", "LC_ALL=C; [ $$(($$(date +%s) - $$(runuser -u www-data -- php /var/www/html/occ config:app:get core lastcron))) -le 900 ] || exit 1"]
interval: 5m
timeout: 15s
retries: 3
start_period: 2m
networks:
+26 -2
View File
@@ -48,8 +48,27 @@ services:
environment:
- CONTAINER_NAME=palworld-server
- DOCKER_HOST=tcp://admin-backend:2375
- PASSWORD=saf3fluffypvvd
- USERNAME=admin
- PASSWORD=${PANEL_PASS}
- USERNAME=${PANEL_USER}
healthcheck:
test:
- "CMD"
- "python3"
- "-c"
- |
import urllib.request, sys
try:
urllib.request.urlopen('http://localhost:5000/', timeout=5)
except urllib.error.HTTPError as e:
if e.code in [401, 403]:
sys.exit(0)
sys.exit(1)
except Exception:
sys.exit(1)
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
admin-backend:
image: tecnativa/docker-socket-proxy
@@ -63,6 +82,11 @@ services:
- CONTAINERS=1
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 2375 || exit 1"]
interval: 10s
timeout: 3s
retries: 3
networks:
palworld-admin:
internal: true
+5
View File
@@ -17,3 +17,8 @@ services:
options:
max-size: "50m"
max-file: "3"
healthcheck:
test: ["CMD", "/usr/bin/check-health"]
interval: 10s
timeout: 3s
retries: 3
Regular → Executable
+4 -2
View File
@@ -7,11 +7,13 @@ docker compose -f ~/reverse_proxy/compose.yaml --project-directory ~/reverse_pro
docker compose -f ~/uptime-kuma/compose.yaml --project-directory ~/uptime-kuma/ up -d
#create palworl server, don't start it
docker compose -f ~/palworld/compose.yaml --project-directory ~/palworld up --no-start
docker compose -f ~/palworld/compose.yaml --project-directory ~/palworld create
docker compose -f ~/palworld/compose.yaml --project-directory ~/palworld start admin-panel admin-backend
#create matrix server and database
#todo: split synapse and postgre at some point
docker compose -f~/docker/synapse/compose.yaml --project-directory ~/docker/synapse up -d
docker compose -f ~/docker/synapse/compose.yaml --project-directory ~/docker/synapse up -d
#start jellyfin
if [[ ! -d ~/jellyfin/jellyfin-media-remote/foxgirls-jelly ]] ; then