GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docker/entrypoint.sh at main · Altered-Wiki/docker

Expand file tree

/

entrypoint.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
67 lines (53 loc) · 2.18 KB
/

entrypoint.sh

Copy path

File metadata and controls

executable file
·
67 lines (53 loc) · 2.18 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
set -eo pipefail
MW=/var/www/html
SENTINEL="$MW/images/.mw-installed"
SETTINGS_SRC=/etc/mediawiki/LocalSettings.php
if [ -z "$MW_ADMIN_PASSWORD" ]; then
echo "[entrypoint] ERROR: MW_ADMIN_PASSWORD is not set" >&2
exit 1
fi
first_run() {
echo "[entrypoint] First run — installing MediaWiki"
# installer refuses to run if LocalSettings.php exists
rm -f "$MW/LocalSettings.php"
php "$MW/maintenance/install.php" \
--dbserver="$MEDIAWIKI_DB_HOST" \
--dbname="$MEDIAWIKI_DB_NAME" \
--dbuser="$MEDIAWIKI_DB_USER" \
--dbpass="$MEDIAWIKI_DB_PASSWORD" \
--server="${MW_SERVER:-http://localhost}" \
--scriptpath="" \
--pass="$MW_ADMIN_PASSWORD" \
"altered.wiki" "Admin"
# replace installer-generated LocalSettings.php with ours
cp "$SETTINGS_SRC" "$MW/LocalSettings.php"
echo "[entrypoint] Running database update"
php "$MW/maintenance/run.php" update --quick
echo "[entrypoint] Initializing Semantic MediaWiki"
php "$MW/extensions/SemanticMediaWiki/maintenance/setupStore.php"
echo "[entrypoint] Configuring CirrusSearch"
php "$MW/extensions/CirrusSearch/maintenance/UpdateSearchIndexConfig.php"
php "$MW/extensions/CirrusSearch/maintenance/ForceSearchIndex.php"
echo "[entrypoint] Setting system messages"
echo "know what you're taking" \
| php "$MW/maintenance/run.php" edit --user="Admin" --summary="Initial setup" \
"MediaWiki:Citizen-footer-desc"
echo "Psychoactive substances documented by the people who know them." \
| php "$MW/maintenance/run.php" edit --user="Admin" --summary="Initial setup" \
"MediaWiki:Citizen-footer-tagline"
echo "-" \
| php "$MW/maintenance/run.php" edit --user="Admin" --summary="Initial setup" \
"MediaWiki:Aboutsite"
touch "$SENTINEL"
echo "[entrypoint] Setup complete"
}
if [ ! -f "$SENTINEL" ]; then
first_run
else
# upgrade path: sync LocalSettings and apply any schema changes
cp "$SETTINGS_SRC" "$MW/LocalSettings.php"
echo "[entrypoint] Running database update"
php "$MW/maintenance/run.php" update --quick
fi
exec docker-php-entrypoint "$@"
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.