The BlueSpice Containers project is an unified development setup for BlueSpice. It features:
- Full picture of BlueSpice: All components outside the wiki codebase are collected into one single repo, making browse/grep easy
- Source to containers, no blackboxes: Build all images with one command, then run containers reflecting current source in your workspace
- Dev setup, mostly automated: A script wires up dev-ready configs onto the deployment stack, a few tweaks and you're ready to go.
.
├── bluespice-containers (clone this project, switch to target branch)
├── code (clone wiki codebase, build it in target branch)
└── data (`mkdir data`)
Optionally, you might want to clone certain not-yet-published repos under bluespice-containers/images or bluespice-containers/webservices. Target subdirectories should be in bluespice-containers/.gitignore.
cd bluespice-containers
./maintenance.sh --build --buildargs EDITION=freeOptionally, assume that you prepared access tokens ~/.github-token and/or ~/.gitlab-token (needed for pro, farm or even galaxy editions and certain images - modify the EDITION argument in the command according to your specific case):
GITHUB_TOKEN=$(cat ~/.github-token) GITLAB_HW_TOKEN=$(cat ~/.gitlab-token) \
./maintenance.sh --build --buildargs EDITION=farm./maintenance.sh --dev-setup
This script creates two files:
deploy/compose/.env: you need to tweak it further:CODEDIRandDATADIRshould match absolute addresses ofcodeanddatain Step 1EDITION,DB_USERandDB_PASSshould be configured - read official tutorial for richer details
deploy/compose/docker-compose.override.ymlworks out of the box- Optionally you can enable advanced configs here, e.g use xdebug, add packages to containers and so on.
cd deploy/compose
./bluespice-deploy up -d
Optionally:
- to run wiki on a local only host name, add it to your
/etc/hostsfile - to run wiki in
httpsprotocol, add the.keyand.crtcertificate files of your domain name to${DATADIR}/proxy/certs, then run./bluespice-deploy restart proxyto load the certificate - use
--buildtag for the first run to utilize inline Dockerfile in the override yml
- Run
./bluespice-deploy up -d --buildfor once, so that composer is added to your wiki containers - If you are running farm edition, please add the following lines to your
pre-init-settings.php:
if ( defined( 'MW_PHPUNIT_TEST' ) && MW_PHPUNIT_TEST ) {
$GLOBALS['wgSharedTables'] = [];
}- Inside a wiki container (e.g
./bluespice-deploy exec -it wiki-web bash), go to/app/bluespice/w - Run your tests, for example
composer phpunit extensions/WikiRAG/tests/phpunit/integration/
bsc is a small helper script to control your running Docker instances. We
suggest placing it in your $PATH, so that it can be called from everywhere,
e.g., by symlinking it:
cd /usr/local/bin
ln -s $INSTALL_DIR/bin/bsc
bsc help shows the usage instructions.
It is a thin wrapper around docker compose. Most commands will be sent
directly to the latter.
Run bsc boot. This command will instantly spawn the Docker containers as
daemons. It is equivalent to docker compose up -d.
Use bsc down to stop the services again.
Run bsc exec wiki-task bash to enter the task container. Same with all the
other containers.
Run bsc cp $(pwd)/file.txt wiki-task:/tmp/ to copy ./file.txt into the
wiki-task container.
You have to give an absolute local path to the tool, because under the hood it
needs to cd into the folder with the docker-compose.yml files, changing the
current working directory.
Run bsc edit-env to quickly change aspects of your setup, e.g., the data
directory. Run bsc restart for the effects to take effect.