-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Below are instructions from Wikiworks about how to run BugSigDb locally. I'm putting them here to document, share, and work out problems, so that later we can update either the README or add a document to the repository with instructions (or script). We can use the issue to discuss how it works.
Running BugSigDB stack locally
Get code
Clone the repo:
git clone https://github.com/waldronlab/BugSigDB
Or update existing repo:
git checkout master
git pull
Modules
Make sure that the necessary modules have been installed. Run from the wiki stack root:
cd to/mediawiki/docker/compose
git submodule update --init
Database
By default, the local wiki will be created empty. Get a copy of the database from the BugSigDB server and put it in the __initdb directory inside the stack.
Secrets
Create secrets and add passwords:
cd secrets
./_create_empty_secret_files.sh
Volumes
Make sure that necessary docker volumes are created:
docker compose up -d --no-start
Networking (with Traefik)
ACCESS TO https://github.com/WikiTeq/docker-mediawiki-traefik IS REQUIRED OTHERWISE FOLLOW NETWORKING (WITHOUT TRAEFIK) BELOW
The BugSigDB MediaWiki stack is designed to work with Traefik.
Step 1. Create a local DNS record
Linux offers a file /etc/hosts to configure local DNS records (other OSes should have equivalents). Associate localtest.me with the local IP. Here is my file content:
➜ ~ cat /etc/hosts
# Standard host addresses
127.0.0.1 localhost localtest.me
Step 2. Make sure the Traefik is up and running
Clone WikiTeq traefik docker-compose repo.
There is .env.localtest.me file with predefined settings for local development. Make it work by creating a symlink
ls -s .env.localtest.me .env
Or rename it to .env.
Run Traefik:
cd to/traefik/docker/compose
docker compose up -d
Step 3. Run wiki stack
There is .env.localtest.me file with predefined settings for local development. Make it work by creating a symlink
cd to/mediawiki/docker/compose
ls -s .env.localtest.me .env
Run the stack:
docker compose up -d
Networking (without Traefik)
It is possible to make the stack run without Traefik.
Step 1. Create a local DNS record
It can be skipped.
Step2. Adjust environment
In the .env.localtest.me set MW_SITE_SERVER to http://localhost:8081 and make it work by symlinking or copying it to .env (port can be whatever allowed port)
Step 3. Adjust compose file
In the compose.yml add the ports section with the port from Step 2 to the varnish service:
varnish:
image: pastakhov/varnish:7.0
restart: unless-stopped
networks:
- default
- traefik-public
depends_on:
- web
ports:
- "${PORT:-127.0.0.1:8081}:80"
tmpfs:
- /var/lib/varnish:exec
Comment out all network sections in all services and at the bottom (before volumes definition). Like this:
restart: unless-stopped
# networks:
#
- default
# - traefik-public
depends_on:
Save changes and run the stack:
docker compose up -d
Navigate to http://localhost:8081 to see the wiki.
Update entity collation
If you see a banner about pending SemanticMediaWiki tasks, run from the wiki stack root:
docker compose exec web bash -cl 'php extensions/SemanticMediaWiki/maintenance/updateEntityCollation.php'