Skip to content

Commit

Permalink
Merge pull request #241 from keymanapp/fix/240-force-re-download-of-data
Browse files Browse the repository at this point in the history
fix: force re-download of data when building database
  • Loading branch information
mcdurdin authored Feb 15, 2024
2 parents 72c85e4 + 62a048b commit e14ca33
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,4 @@ RUN docker-php-ext-install pdo pdo_mysql zip
RUN docker-php-ext-enable sqlsrv pdo_sqlsrv pdo pdo_mysql
COPY --from=composer-builder /composer/vendor /var/www/vendor

# This is handled in init-container.sh
# RUN ls -l /var/www/ && php /var/www/html/tools/db/build/build_cli.php
RUN a2enmod rewrite; a2enconf keyman-site
# service apache2 restart
RUN a2enmod rewrite; a2enconf keyman-site
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"build": [
"Composer\\Config::disableProcessTimeout",
"php ./tools/db/build/build_cli.php"
"php ./tools/db/build/build_cli.php -f"
],
"lint": "find . -name '*.php' | grep -v '/vendor/' | xargs -n 1 php -l"
}
Expand Down
2 changes: 1 addition & 1 deletion resources/init-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ sleep 15;
# If we know we are immediately going to run tests, there's no need to build
# the database and then rebuild it again as a test database!
if [[ ! -f /var/www/html/tier.txt ]] || [[ $(</var/www/html/tier.txt) != TIER_TEST ]]; then
php /var/www/html/tools/db/build/build_cli.php
php /var/www/html/tools/db/build/build_cli.php -f
fi
2 changes: 1 addition & 1 deletion tests/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Because this data takes a while to build, and is static, we build the database once when first running any test class, based on the state of the t_dbdatasources table (we test the langtags.json record). If this matches the test data, we don't rebuild. The rebuild will occur on the active schema (it doesn't swap schemas).

This means that the local database will be using test data post-test (we don't rebuild from live data), so don't forget to run tools/db/build/build_cli.php to rebuild from live data if you need it.
This means that the local database will be using test data post-test (we don't rebuild from live data), so don't forget to run tools/db/build/build_cli.php -f to rebuild from live data if you need it.

These data files were downloaded at approximately 2020-05-25 3:40pm AEST.
Note: langtags.json - version 1.1.1 downloaded from https://raw.githubusercontent.com/silnrsi/langtags/master/pub/langtags.json (1.1.1 is still in staging)

0 comments on commit e14ca33

Please sign in to comment.