Skip to content

Commit

Permalink
Adjust migrate build script
Browse files Browse the repository at this point in the history
Removed default CMD to run migrate job in Dockerfile
Fixed configMap createion with specified/modified file name
  • Loading branch information
warrenchristian1telus committed Dec 29, 2023
1 parent 9e7883e commit aa76ecd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Moodle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ COPY ./config/moodle/moodle_index_during_maintenance.php /tmp/moodle_index_durin
COPY ./openshift/scripts/migrate-build-files.sh /usr/local/bin/migrate-build-files.sh
COPY ./openshift/scripts/test-migration-complete.sh /usr/local/bin/test-migration-complete.sh

CMD ["/bin/bash", "/usr/local/bin/migrate-build-files.sh"]
# CMD ["/bin/bash", "/usr/local/bin/migrate-build-files.sh"]
4 changes: 2 additions & 2 deletions openshift/migrate-build-files-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ objects:
- bash
- "-c"
- |
echo "Migrating build fiiles to persistent volume"
cp -ru /app/public/* /var/www/html
echo "Migrating build files from /app/public to /var/www/html..."
sh /usr/local/bin/migrate-build-files.sh
imagePullPolicy: Always
restartPolicy: Never
parameters:
Expand Down
4 changes: 2 additions & 2 deletions openshift/scripts/deploy-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ echo "Current namespace is $DEPLOY_NAMESPACE"

# Create ConfigMaps
oc create configmap $WEB_DEPLOYMENT_NAME-config --from-file=./config/nginx/default.conf
oc create configmap $APP-config --from-file=./config/moodle/$MOODLE_ENVIRONMENT.config.php
oc create configmap $CRON_DEPLOYMENT_NAME-config --from-file=./config/cron/$MOODLE_ENVIRONMENT.config.php
oc create configmap $APP-config --from-file=config.php=./config/moodle/$MOODLE_ENVIRONMENT.config.php
oc create configmap $CRON_DEPLOYMENT_NAME-config --from-file=config.php=./config/cron/$MOODLE_ENVIRONMENT.config.php

oc -n $DEPLOY_NAMESPACE process -f ./openshift/template.json \
-p APP_NAME=$APP \
Expand Down

0 comments on commit aa76ecd

Please sign in to comment.