Skip to content

Commit 6fdba16

Browse files
committed
🏴‍☠️ Arrr! Kept the Privateer afloat so Synology don't hoist the yellow flag o' shame
1 parent 6421713 commit 6fdba16

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

docker-compose.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ services:
118118
volumes:
119119
- ${PRIVATEERR_WIREGUARD_CONFIG}:/${PIA_CONF_PATH}:rw # Mount the WireGuard configuration file
120120

121+
# Run setup script, create marker file, and keep container alive to prevent Synology from marking project as degraded
122+
command: sh -c "${PRIVATEERR_RUN_SETUP} && touch ${PRIVATEERR_HEALTHCHECK_MARKER} && tail -f /dev/null"
123+
124+
# Define container healthcheck to verify Privateer has completed setup
125+
healthcheck:
126+
test: ["CMD-SHELL", "[ -f ${PRIVATEERR_HEALTHCHECK_MARKER} ]"] # Healthy when healthcheck marker file exists
127+
<<: *default-healthcheck-settings # Pull in default healthcheck settings
128+
121129
#
122130
# Define the 'gluetun' service to route traffic through a WireGuard VPN connection
123131
#
@@ -168,8 +176,8 @@ services:
168176

169177
# Specify container service dependencies
170178
depends_on:
171-
privateerr: # Depends on privateer to generate the WireGuard config
172-
condition: service_completed_successfully # Wait for container to exit successfully
179+
privateerr:
180+
condition: service_healthy # Wait for Privateer to generate the WireGuard config and report healthy
173181

174182
#
175183
# Define the 'flaresolverr' service to bypass Cloudflare and DDoS-GUARD protection

example.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ PRIVATEERR_BASE_TAG="${PRIVATEERR_BASE_TAG:-20.04}"
5555
PRIVATEERR_IMAGE="${PRIVATEERR_IMAGE:-ghcr.io/scottgigawatt/privateerr}"
5656
PRIVATEERR_TAG="${PRIVATEERR_TAG:-latest}"
5757
PRIVATEERR_WIREGUARD_CONFIG="${PRIVATEERR_WIREGUARD_CONFIG:-./config/gluetun/wireguard/wg0.conf}"
58+
PRIVATEERR_RUN_SETUP="${PRIVATEERR_RUN_SETUP:-/pia/run_setup.sh}"
59+
PRIVATEERR_HEALTHCHECK_MARKER="${PRIVATEERR_HEALTHCHECK_MARKER:-/tmp/privateerr.ready}"
5860

5961
#
6062
# Privateerr environment variables for PIA manual WireGuard connection

0 commit comments

Comments
 (0)