Skip to content

Commit

Permalink
Fix PHP custom config to get max_input_vars > 5000
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenchristian1telus committed Oct 12, 2023
1 parent 438e6de commit 3adbfc0
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,36 @@ jobs:
echo "${{ inputs.REDIS_DEPLOYMENT_NAME }} Updates complete."
fi
- name: 🚀 Deploy Backup Container
run: |
if [[ `oc describe sts backup 2>&1` =~ "NotFound" ]]; then
echo "Backup container NOT FOUND. Begin backup container deployment..."
helm repo add bcgov http://bcgov.github.io/helm-charts
helm upgrade --install backup -f config.yaml bcgov/backup-storage
else
echo "Backup container installation FOUND. Updating..."
echo '
backupConfig: |
mariadb=db/moodle
0 1 * * * default ./backup.sh -s
0 4 * * * default ./backup.sh -s -v all
db:
secretName: moodle-secrets
usernameKey: database-user
passwordKey: database-password
env:
DATABASE_SERVICE_NAME:
value: db
ENVIRONMENT_FRIENDLY_NAME:
value: "DB Backups"
' > config.yaml
helm upgrade backup bcgov/backup-storage
echo "Backup container updates completed."
fi
# For a graceful termination, set the replica count of the Pods in the mariadb-galera StatefulSet to 0:
# oc scale sts ${{ inputs.DB_DEPLOYMENT_NAME }} --replicas=0
# To uninstall/delete the my-release release:
Expand Down
7 changes: 4 additions & 3 deletions PHP.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ ARG DATAFLOWS_BRANCH_VERSION=MOODLE_35_STABLE

# Moodle App directory
ENV MOODLE_APP_DIR /app/public
# ENV PHP_INI_DIR $ETC_DIR/php
ENV PHP_INI_FILE /usr/local/etc/php/php.ini
ENV ETC_DIR=/usr/local/etc
ENV PHP_INI_DIR $ETC_DIR/php
ENV PHP_INI_FILE /php.ini

RUN echo "Building Moodle version: $MOODLE_BRANCH_VERSION for $PHP_INI_ENVIRONMENT environment"

Expand Down Expand Up @@ -64,7 +65,7 @@ RUN docker-php-ext-enable redis
RUN git clone --recurse-submodules --jobs 8 --branch $MOODLE_BRANCH_VERSION --single-branch https://github.com/moodle/moodle $MOODLE_APP_DIR

RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_FILE"
COPY ./config/php/php.ini "$PHP_INI_DIR/moodlephp.ini"
COPY ./config/php/php.ini "$PHP_INI_DIR/conf.d/moodlephp.ini"
COPY ./config/php/php-fpm.conf "/usr/local/etc/php-fpm.d"
COPY ./config/moodle/config.php "/app/public/config.php"

Expand Down
4 changes: 4 additions & 0 deletions openshift/scripts/deploy-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ echo "deploy1=$PHP_DEPLOYMENT_NAME is deployed" >> $GITHUB_OUTPUT
# pwd
echo "$CRON_DEPLOYMENT_NAME is deployed"
echo "deploy2=$CRON_DEPLOYMENT_NAME is deployed" >> $GITHUB_OUTPUT

# Deploy backups
helm repo add bcgov http://bcgov.github.io/helm-charts
helm upgrade --install db-backup-storage bcgov/backup-storage

0 comments on commit 3adbfc0

Please sign in to comment.