This is to test the mediawiki dumps from the hosting service.
- Download dumps and prepare them
- Download
- Go to "Control Panel"
- "Files" -> "Backup"
- Select "Files" and "MySQL 5"; click "Backup now"
- (Wait for backups to be created, may take a few minutes)
- Click on "Download backups" tab
- Download the created "files.tar.gz" and "mysql5.tar.gz"
- Prepare
- (Assuming downloads from above in /tmp/foo)
tar -zxvf mysql5.tar.gzshould produce a file likegeneontology_mediawiki-2138-1649973677.sqltar -zxvf files.tar.gzshould produce a file tree starting at/tmp/foo/home/- Be in cloned
go-hosted-wiki mv /tmp/foo/home/geneontology/www/www ./wikidumps/mv /tmp/foo/geneontology_mediawiki-xxxx.sql ./sqldumps/
- Download
- Ready docker environment
cp ./stack.yaml.sample ./stack.yamlstack.yamlcontains the mysql root password that we'll be forcing in our environment--MYSQL_ROOT_PASSWORD--you can modify this to your liking if needed; to match this example, one would change it to "mypass"- On unix replace the user attribute in
stack.yamlwith the proper uid and gid of the user on the host machine. this can be found with the commandid -u && id -g - On mac be sure to delete the user attribute in
stack.yaml- Port 8080 is exposed by default; modify it if need be in
stack.yaml.
- Port 8080 is exposed by default; modify it if need be in
cp ./sqldumps/user.sql.sample ./sqldumps/user.sql- similarly,
user.sqlcontains the mysql user that we'll be forcing in our environment; you can modify this to your liking if needed; to match this example, one would not need to change anything
- similarly,
Modify these variables in wikidumps/www/LocalSettings.php to match what you want and what was defined above in stack.yaml and users.sql.
- $wgServer = "http://your-host-or-ip:8080";
- On mac, this is the ip for en0; on other systems, maybe a mock listing in /etc/hosts, like test.wiki.com.
- This seems to sometimes not work so well (YMMV) for localhost and loopbacks, so trying to use a "real" IP or hostname may be preferable.
- Use credentials in
./sqldumps/user.sql(or modify both files with a different user and password)- $wgDBuser = "myuser";
- $wgDBpassword = "mypass";
- $wgDBserver = "go-wiki-db";
The steps below will launch the mediawiki and mysql containers. The first time the mysql container is launched,
it will execute the sql scripts in sqldumps directory. When stack is ready, the wiki can be accessed at
http://{host-ip}:{exposed-port} or http://localhost:8080 if testing locally and did not modify the exposed port
in stack.yaml
docker-compose -f stack.yaml up -d
docker-compose -f stack.yaml logs -f