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 editions and certain images):
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/