File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ PRIVATEERR_BASE_TAG="${PRIVATEERR_BASE_TAG:-20.04}"
5555PRIVATEERR_IMAGE = " ${ PRIVATEERR_IMAGE:-ghcr.io/scottgigawatt/privateerr } "
5656PRIVATEERR_TAG = " ${ PRIVATEERR_TAG:-latest } "
5757PRIVATEERR_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
You can’t perform that action at this time.
0 commit comments