Skip to content

Commit

Permalink
mediawiki
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaofeng1227 committed Jan 8, 2024
1 parent 54b5257 commit 183606c
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 31 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions apps/kafka copy/src/after_up.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions apps/kafka copy/src/filelist
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker-compose.yml
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion apps/mediawiki/.env
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ MEDIAWIKI_DATABASE_PASSWORD=$W9_POWER_PASSWORD
MEDIAWIKI_USERNAME=$W9_LOGIN_USER
MEDIAWIKI_PASSWORD=$W9_LOGIN_PASSWORD
MEDIAWIKI_EMAIL=[email protected]
MEDIAWIKI_HOST=$W9_URL
# if wgServer is "//", it will be ok on all of url(domain and IP)
# if MEDIAWIKI_HOST="", it will be "//localhost", can not access web page
MEDIAWIKI_HOST="//"
MEDIAWIKI_WIKI_NAME=MediaWiki
30 changes: 0 additions & 30 deletions apps/mediawiki/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,6 @@ services:
MYSQL_PASSWORD: $W9_POWER_PASSWORD
MYSQL_ROOT_PASSWORD: $W9_POWER_PASSWORD

# this used for running command to modify Mediawiki's LocalSettings.php
busybox:
image: busybox
volumes:
- mediawiki:/data
depends_on:
- mediawiki
command: |
/bin/sh -c '
if [ -z "$W9_URL" ]; then
echo "W9_URL is empty, no need to change, exiting..."
exit 0
fi
while [ ! -f /data/LocalSettings.php ]; do
echo "Waiting for LocalSettings.php to be created..."
sleep 2
done
echo "LocalSettings.php found, proceeding..."
if echo "$W9_URL" | grep -q "[a-zA-Z]"; then
media_url=$W9_URL
echo "URL is a domain name"
else
media_url=$W9_URL:$W9_HTTP_PORT_SET
echo "URL is an IP address"
fi
sleep 5
#sed -i "s|wgServer = .*|wgServer = \"//$$media_url\";|g" /data/LocalSettings.php
sed -i "s|wgServer = .*|wgServer = \"//\";|g" /data/LocalSettings.php
'
networks:
default:
name: ${W9_NETWORK}
Expand Down

0 comments on commit 183606c

Please sign in to comment.