Skip to content

Commit

Permalink
Merge pull request #610 from MaRDI4NFDI/rm-w-symlink
Browse files Browse the repository at this point in the history
Update core path
  • Loading branch information
physikerwelt authored Jan 11, 2025
2 parents 048df73 + b91fe79 commit 880dbb4
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ services:
expose:
- 9000
volumes:
- ./extensions-dev/<extension_to_debug>:/var/www/html/extensions/<extension_to_debug>
- ./extensions-dev/<extension_to_debug>:/var/www/html/w/extensions/<extension_to_debug>
- ./debugging/php.ini:/usr/local/etc/php/php.ini
```
Here `./extensions-dev/<extension_to_debug>` is the path of your local development checkout of the extension, you modify.
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
environment:
<<: *wikibase_variables
volumes:
- ./mediawiki/LocalSettings.d:/var/www/html/LocalSettings.d:ro
- ./mediawiki/LocalSettings.d:/var/www/html/w/LocalSettings.d:ro

elasticsearch:
environment:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ services:
wikibase_updater:
image: *wikibase-image
entrypoint: /usr/local/bin/php
command: /var/www/html/maintenance/update.php --conf /shared/LocalSettings.php
command: /var/www/html/w/maintenance/update.php --conf /shared/LocalSettings.php
links:
- mysql
- mongo
Expand Down
8 changes: 4 additions & 4 deletions docker-compose-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ x-jaegertracing-image: &jaegertracing-image
x-latexml-image: &latexml-image
physikerwelt/latexml
x-mardi-backup-image: &mardi-backup-image
ghcr.io/mardi4nfdi/docker-backup
ghcr.io/mardi4nfdi/docker-backup:1.44
x-mardi-importer-image: &mardi-importer-image
ghcr.io/mardi4nfdi/docker-importer:main
x-mardi-importer-api-image: &mardi-importer-api-image
Expand Down Expand Up @@ -239,7 +239,7 @@ services:
# shared from wikibase, to run dumpBackup.php and importBackup.php
- shared_mardi_wikibase:/shared/:ro
- ./mediawiki/LocalSettings.d:/shared/LocalSettings.d
- shared_mediawiki_images:/var/www/html/images/
- shared_mediawiki_images:/var/www/html/w/images/
# dir on host where to store the backups
- ${BACKUP_DIR:-./backup}:/data
labels:
Expand Down Expand Up @@ -401,8 +401,8 @@ services:
image: *matomo-image
restart: always
volumes:
# - ./config:/var/www/html/config
# - ./logs:/var/www/html/logs
# - ./config:/var/www/html/w/config
# - ./logs:/var/www/html/w/logs
- matomo:/var/www/html
environment:
- MATOMO_DATABASE_HOST=${MATOMO_DATABASE_HOST}
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ x-quickstatements-image: &quickstatements-image
x-redis: &redis-image
redis:7
x-redis-jobrunner: &redis-jobrunner-image
ghcr.io/mardi4nfdi/docker-redis-jobrunner
ghcr.io/mardi4nfdi/docker-redis-jobrunner:1.44
x-traefik-image: &traefik-image
traefik:v2.8
x-wikibase: &wikibase-image
Expand Down Expand Up @@ -69,10 +69,10 @@ services:
## This shares the configuration with jobrunner
- shared_mardi_wikibase:/shared/:rw
- ./mediawiki/LocalSettings.d:/shared/LocalSettings.d
- ./mediawiki/LocalSettings.d:/var/www/html/LocalSettings.d
- shared_mediawiki_images:/var/www/html/images/:rw
- ./mediawiki/LocalSettings.d:/var/www/html/w/LocalSettings.d
- shared_mediawiki_images:/var/www/html/w/images/:rw
- quickstatements-data:/quickstatements/data
- formulasearch_harvests:/var/www/html/my_harvests/
- formulasearch_harvests:/var/www/html/w/my_harvests/
- apache_logs:/var/log/apache2/
networks:
default:
Expand Down
6 changes: 3 additions & 3 deletions mediawiki/LocalSettings.d/Skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
# https://github.com/ProfessionalWiki/MardiSkin
wfLoadExtension( 'Bootstrap' );
wfLoadskin( 'chameleon' );
$egChameleonLayoutFile= '/var/www/html/skins/MardiSkin/layout.xml';
$egChameleonLayoutFile= '/var/www/html/w/skins/MardiSkin/layout.xml';
$egChameleonExternalStyleModules = [
'/var/www/html/skins/MardiSkin/variables.scss' => 'beforeVariables',
'/var/www/html/skins/MardiSkin/styles.scss' => 'afterMain',
'/var/www/html/w/skins/MardiSkin/variables.scss' => 'beforeVariables',
'/var/www/html/w/skins/MardiSkin/styles.scss' => 'afterMain',
];
if ( $wgDBname === 'my_wiki' ){
$wgDefaultSkin = 'chameleon';
Expand Down
2 changes: 1 addition & 1 deletion mediawiki/LocalSettings.d/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

$wgGroupPermissions['bureaucrat']['editwidgets'] = true;

$wgWidgetsCompileDir = "/var/www/html/images";
$wgWidgetsCompileDir = "/var/www/html/w/images";
2 changes: 1 addition & 1 deletion redis-jobrunner-conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@
"redis:6379"
]
},
"dispatcher": "/var/www/html/maintenance/run runJobs --type=%(type)x --maxtime=%(maxtime)x --memory-limit=%(maxmem)x --result=json --conf=/shared/LocalSettings.php"
"dispatcher": "/var/www/html/w/maintenance/run runJobs --type=%(type)x --maxtime=%(maxtime)x --memory-limit=%(maxmem)x --result=json --conf=/shared/LocalSettings.php"
}
16 changes: 8 additions & 8 deletions test/test_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ test_4() {
test_5() {
# 1. upload a test image file via importImages.php
# 2. create a backup
# 3. delete the file from /var/www/html/images
# 3. delete the file from /var/www/html/w/images
# 4. restore the backup of the images directory
# 5. check if the file is available
# 6. cleanup: delete the file again with deleteBatch.php and from images
Expand All @@ -199,7 +199,7 @@ test_5() {
test_image="Test_image_backup_${rand_str}.png"
mkdir "$rand_dir" && cp /test/test_image_backup.png "${rand_dir}/${test_image}"
if \
! su -l www-data -s /bin/bash -c 'php /var/www/html/maintenance/importImages.php --conf /shared/LocalSettings.php --comment "TEST importing images backup" '"$rand_dir" >/dev/null
! su -l www-data -s /bin/bash -c 'php /var/www/html/w/maintenance/importImages.php --conf /shared/LocalSettings.php --comment "TEST importing images backup" '"$rand_dir" >/dev/null
then
echo " - Test restore images FAILED: Error uploading image file with importImages.php! (status $?)"
exit 1
Expand All @@ -217,15 +217,15 @@ test_5() {
/app/backup.sh &>/dev/null

## 3. delete files from storage
found_file=$(cd /var/www/html/images && find . -name "*$test_image" -print -quit |\
found_file=$(cd /var/www/html/w/images && find . -name "*$test_image" -print -quit |\
sed 's/^\.\///')
if ! find /var/www/html/images -name "*${test_image}" -delete
if ! find /var/www/html/w/images -name "*${test_image}" -delete
then
echo " - Test restore images FAILED: uploaded file not found in /var/www/html/images! (status $?)"
echo " - Test restore images FAILED: uploaded file not found in /var/www/html/w/images! (status $?)"
exit 1
else
# delete all empty folders, too
find /var/www/html/images -name "*" -type d -empty -delete
find /var/www/html/w/images -name "*" -type d -empty -delete
fi

response=$(_get_wiki_http_response_code "${IMG_URL}/${found_file}")
Expand All @@ -240,7 +240,7 @@ test_5() {
## 5. check if file was restored
# NOTE: only checks for original file, not deleted or archived files!
# find restored file on disk
found_restored=$(cd /var/www/html/images && find . -name "$test_image" -print -quit)
found_restored=$(cd /var/www/html/w/images && find . -name "$test_image" -print -quit)
if [[ -z $found_restored ]]; then
echo " - Test restore images FAILED: restored file not found on the disk!"
exit 1
Expand All @@ -257,7 +257,7 @@ test_5() {
tempfile="$rand_dir/tmp.$rand_str"
echo "File:${test_image}" > "$tempfile"
if \
! php /var/www/html/maintenance/deleteBatch.php \
! php /var/www/html/w/maintenance/deleteBatch.php \
--conf /shared/LocalSettings.php \
--r "delete temp test file" "$tempfile" >/dev/null
then
Expand Down

0 comments on commit 880dbb4

Please sign in to comment.