Using docker-compose-ci: Difference between revisions
From Freephile Wiki
initial write-up |
(No difference)
|
Revision as of 14:38, 26 November 2025
These notes need to be incorporated with Automated deployment of MediaWiki and also PHPUnit/VSCode
I added docker-compose-ci to the CrawlerProtection extension, and here is how to do it.
- create a Makefile
- create an .env file
- create a docker-compose-override.yml file in the 'build' directory
Makefile[edit]
do not specify COMPOSER_EXT=false or NODE_JS=false Any value will cause that code branch to run, potentially causing a build failure.
-include .env
export
# setup for docker-compose-ci build directory
ifeq (,$(wildcard ./build/))
$(shell git submodule update --init --remote)
endif
EXTENSION=CrawlerProtection
# docker images
MW_VERSION?=1.43
PHP_VERSION?=8.2
DB_TYPE?=mysql
DB_IMAGE?="mariadb:11.2"
# composer
# Enables "composer update" inside of extension
# Leave empty/unset to disable, set to "true" to enable
COMPOSER_EXT?=
# nodejs
# Enables node.js related tests and "npm install"
# Leave empty/unset to disable, set to "true" to enable
NODE_JS?=
include build/Makefile.env[edit]
Here's the .env file I used to set key variables[1] relevant to my extension.