-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall
executable file
·56 lines (47 loc) · 1.41 KB
/
install
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
#!/bin/bash
set -e
if [[ $1 = 'skip-clone' ]]
then
echo "Skipping git clone"
if [[ ! -d "$MW_INSTALL_DIR" ]]
then
echo "The directory $MW_INSTALL_DIR does not exist. Please create it and run this script with the 'skip-clone' parameter again."
exit 1
fi
cd $MW_INSTALL_DIR;
else
git clone https://gerrit.wikimedia.org/r/mediawiki/core.git mediawiki
cd mediawiki
fi
cat > docker-compose.override.yml <<EOF
version: '3.7'
services:
mediawiki:
user: "\${MW_DOCKER_UID}:\${MW_DOCKER_GID}"
EOF
cat > .env <<EOF
MW_DOCKER_PORT=8080
MW_SCRIPT_PATH=/w
MW_SERVER=http://localhost:8080
MEDIAWIKI_USER=Admin
MEDIAWIKI_PASSWORD=dockerpass
XDEBUG_CONFIG=''
EOF
echo "MW_DOCKER_UID=$(id -u)
MW_DOCKER_GID=$(id -g)" >> .env
export MW_DOCKER_UID=$(id -u)
export MW_DOCKER_GID=$(id -g)
exit
# -d is detached mode - runs containers in the background:
docker-compose up -d
docker-compose exec mediawiki composer update
docker-compose exec mediawiki /bin/bash /docker/install.sh
git clone "https://gerrit.wikimedia.org/r/mediawiki/skins/Vector" skins/Vector
echo "wfLoadSkin( 'Vector' );" >> LocalSettings.php
echo "export MW_INSTALL_DIR="$(pwd) >> ~/.zshrc
echo "export MW_DOCKER_UID=$(id -u)" >> ~/.zshrc
echo "export MW_DOCKER_GID=$(id -g)" >> ~/.zshrc
echo "export MW_INSTALL_DIR="$(pwd) >> ~/.bashrc
echo "export MW_DOCKER_UID=$(id -u)" >> ~/.bashrc
echo "export MW_DOCKER_GID=$(id -g)" >> ~/.bashrc
git review -s --verbose