From 081adca46f0169aa09f38791ca2469b0ccc2e9f5 Mon Sep 17 00:00:00 2001 From: Derek Cooper Date: Sun, 26 Apr 2026 16:24:30 -0700 Subject: [PATCH] Added variables, resource limits and health check --- Dockhand/.env.example | 6 ++++++ Dockhand/docker-compose.yaml | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/Dockhand/.env.example b/Dockhand/.env.example index 00e4a46..1edaff2 100644 --- a/Dockhand/.env.example +++ b/Dockhand/.env.example @@ -1,5 +1,11 @@ # Main interface port for accessing the application DOCKHAND_PORT="3000" +# User ID the container process runs as (run `id -u` on the host to get this) +DOCKHAND_PUID="1000" + +# Group ID the container process runs as (run `id -g` on the host to get this) +DOCKHAND_PGID="1000" + # Time Zone where the application is operating DOCKHAND_TZ="America/Los_Angeles" diff --git a/Dockhand/docker-compose.yaml b/Dockhand/docker-compose.yaml index d75d4f9..614ffea 100644 --- a/Dockhand/docker-compose.yaml +++ b/Dockhand/docker-compose.yaml @@ -8,7 +8,19 @@ services: - /var/run/docker.sock:/var/run/docker.sock - dockhand_data:/app/data environment: + - PUID=${DOCKHAND_PUID} + - PGID=${DOCKHAND_PGID} - TZ=${DOCKHAND_TZ} + deploy: + resources: + limits: + memory: 512m + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:${PORT:-3000}/ || exit 1"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s restart: unless-stopped volumes: