Skip to content

Commit

Permalink
Adjusted APP_KEY check
Browse files Browse the repository at this point in the history
Added echo to check configmap shell
  • Loading branch information
warrenchristian1telus committed Sep 17, 2024
1 parent ccfa39c commit 5f2e1b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ USER www-data
WORKDIR ${BUILD_DIR}

# Check if APP_KEY is set and valid
RUN if [ -z "$APP_KEY" || ! "$APP_KEY" =~ ^base64:[A-Za-z0-9+/=]{43}$ ]; then \
RUN if [ -z "$APP_KEY" ] || ! echo "$APP_KEY" | grep -Eq '^base64:[A-Za-z0-9+/=]{43}$'; then \:
echo "APP_KEY is not set or invalid. Generating a new APP_KEY..."; \
php artisan key:generate --ansi; \
else \
Expand Down
1 change: 1 addition & 0 deletions openshift/scripts/deploy-env-configmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ envsubst < ./example.env > $TEMP_ENV_FILE

if [[ `oc describe configmap $APP_NAME-env 2>&1` =~ "NotFound" ]]; then
# Nothing to delete
echo "ConfigMap does not exist..."
else
echo "ConfigMap exists... Deleting: $APP_NAME-env"
oc delete configmap $APP_NAME-env
Expand Down

0 comments on commit 5f2e1b4

Please sign in to comment.