From ccf7439ce5ab9f524873396f8d27b867a9e629a9 Mon Sep 17 00:00:00 2001 From: Daniel Trolezi Date: Tue, 8 Oct 2024 01:25:17 -0300 Subject: [PATCH] Improve run modes --- docker/entrypoint.sh | 2 +- gcp/tools/deploy-job.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index ba3c16e..475dd13 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -26,7 +26,7 @@ case "$RUN_MODE" in php artisan migrate ;; command) - $RUN_MODE_COMMAND + eval $RUN_MODE_COMMAND ;; *) echo "Invalid RUN_MODE." diff --git a/gcp/tools/deploy-job.sh b/gcp/tools/deploy-job.sh index 140b5ff..0788675 100755 --- a/gcp/tools/deploy-job.sh +++ b/gcp/tools/deploy-job.sh @@ -16,7 +16,7 @@ fi RUN_MODE=$1 # Define command case RUN_MODE=command -RUN_MODE_COMMAND="echo hello-world" +RUN_MODE_COMMAND="sleep 5 && php artisan migrate --seed -vvv" # Copy the template to a new job.yaml file cp "$SCRIPT_DIR/../cloud-run/job.template.yaml" $JOB_DEFINITION