From e333fb15150d8500b2279a92e79dcbc85803693c Mon Sep 17 00:00:00 2001 From: Mia Bennett Date: Mon, 8 Sep 2025 14:22:26 +0930 Subject: [PATCH] feat(cli): add --no-pull option to skip Docker image pulls --- placeos | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/placeos b/placeos index 0c004ca..4662bc8 100755 --- a/placeos +++ b/placeos @@ -164,6 +164,7 @@ Arguments: --domain DOMAIN Domain to configure. [default: localhost:8443] --application APP Application to configure. [default: backoffice] --analytics Set-up analytics stack, including MQTT & InfluxDB & Chronograf + --no-pull Skip pulling Docker images (for local development). -v, --verbose Write logs to STDOUT in addition to the log file. -h, --help Display this message. EOF @@ -174,6 +175,7 @@ start_environment() ( hard_reset=false enable_analytics=false enable_lgtm=false + no_pull=false email_argument="" password_argument="" domain_argument="" @@ -215,6 +217,9 @@ start_environment() ( --lgtm) enable_lgtm=true ;; + --no-pull) + no_pull=true + ;; -v | --verbose) VERBOSE="true" ;; @@ -310,11 +315,12 @@ start_environment() ( "Generating secrets..." \ "Failed to generate secrets." - - run_or_abort \ - "docker compose --env-file='${EMPTY_FILE}' --project-directory='${base_path}' ${PROFILES} pull --quiet" \ - "Pulling images..." \ - "Failed to pull images." + if [ ${no_pull} == "false" ]; then + run_or_abort \ + "docker compose --env-file='${EMPTY_FILE}' --project-directory='${base_path}' ${PROFILES} pull --quiet" \ + "Pulling images..." \ + "Failed to pull images." + fi [ ${hard_reset} == "true" ] && hard_reset