From 73cd82f7714d2143d9712b2be9921f08edeb7c87 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:58:04 +0800 Subject: [PATCH] add Parameter Store as an alternative to AppConfig --- Dockerfile | 2 +- application/run.sh | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a5ac54d..c85413d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ COPY application/ /data/ RUN chown -R www-data:www-data \ console/runtime/ -ADD https://github.com/silinternational/config-shim/releases/latest/download/config-shim.gz config-shim.gz +ADD https://github.com/silinternational/config-shim/releases/download/v1.2.0/config-shim.gz config-shim.gz RUN gzip -d config-shim.gz && chmod 755 config-shim && mv config-shim /usr/local/bin CMD ["/data/run.sh"] diff --git a/application/run.sh b/application/run.sh index ef97125..8c409e3 100755 --- a/application/run.sh +++ b/application/run.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash -if [[ -z "${APP_ID}" ]]; then - /data/yii batch/full -else +if [[ $PARAMETER_STORE_PATH ]]; then + config-shim --path $PARAMETER_STORE_PATH /data/yii batch/full +elif [[ $APP_ID ]]; then config-shim --app $APP_ID --config $CONFIG_ID --env $ENV_ID /data/yii batch/full +else + /data/yii batch/full fi