Jump to content
Toggle sidebar
UNITApedia
Search
English
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Talk
Contributions
Navigation
Main Page
User Guide
Documentation
Viewpoints
Structural
Strategic
Beneficiary
Semantic
Infrastructure
Data
Beneficiaries
UNITA Participants
GEMINAE
Collectives
Agile Management Guide
Quality Management Process
Tools
What links here
Related changes
Special pages
Page information
Page values
In other languages
Editing
Documentation
(section)
Page
Discussion
English
Read
Edit
Edit source
View history
More
Read
Edit
Edit source
View history
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Core Targets === * <code>help</code>: Show available commands and descriptions. * <code>up</code>: Start all containers (<code>$(DC) up -d</code>). * <code>down</code>: Stop all containers (<code>$(DC) down</code>). * <code>restart</code>: Restart all containers. * <code>logs</code>: Follow container logs with the last 100 lines. * <code>clean</code>: Remove local build & backup artifacts, reset extensions directory, and prune unused Docker objects. * <code>build</code> / <code>build-no-ext</code>: Build full stack and initialize MediaWiki extensions and services. * <code>mw-install</code>: Install Composer dependencies and run <code>maintenance/update.php</code> inside the MediaWiki container. * <code>mw-initialize</code>: First-time Composer update (no scripts) and post-install scripts, then run <code>maintenance/update.php</code>. * <code>mw-dev-copy</code>: Copy the MediaWiki containerβs <code>/var/www/html</code> contents into a local folder for development. * <code>backup</code>: Run both <code>backup-mariadb</code> and <code>backup-postgres</code>. * <code>backup-mariadb</code>: Dump the MariaDB database into a timestamped file under <code>services/mariadb/backups</code>. * <code>backup-postgres</code>: Dump the PostgreSQL database into a timestamped file under <code>services/postgres/backups</code>. <pre> # Load environment variables include .env include ./services/mediawiki/.env DC = docker-compose DEFAULT_EXT_VERSION = REL1_39 .DEFAULT_GOAL := help help: ## Show help @echo "Available commands:" @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' # βββββ Docker Lifecycle βββββ up: ## Start all containers $(DC) up -d down: ## Stop all containers $(DC) down restart: ## Restart all containers $(DC) down && $(DC) up -d logs: ## Show container logs $(DC) logs -f --tail=100 clean: ## Remove local build & backup artifacts rm -rf mediawiki_container_folder services/**/backups rm -rf services/mediawiki/extensions && mkdir -p services/mediawiki/extensions docker system prune -a --force build: mw-extensions ## Build full stack, install MediaWiki extensions, and start everything $(DC) build make mw-initialize build-no-ext: ## Build full stack, install MediaWiki extensions, and start everything $(DC) build make mw-initialize # βββββ MediaWiki βββββ mw-install: ## Install composer and update mediawiki (running maintenance script) $(DC) up -d sleep 10 $(DC) exec mediawiki composer install $(DC) exec mediawiki php maintenance/update.php mw-initialize: ## First-time Composer install with no scripts (safe for fresh builds) $(DC) up -d sleep 10 @echo "π¦ Composer update (no-scripts)..." $(DC) exec mediawiki composer update --no-dev --prefer-dist --optimize-autoloader --no-scripts @echo "βοΈ Running post-install/update scripts manually (if any)..." $(DC) exec mediawiki composer run-script post-update-cmd || true @echo "π§Ή Running MediaWiki update.php..." $(DC) exec mediawiki php maintenance/update.php mw-dev-copy: ## Copy MediaWiki container contents locally (for dev) rm -rf mediawiki_container_folder $(DC) cp mediawiki:/var/www/html/. mediawiki_container_folder/ # βββββ Database Backups βββββ backup: ## Backup all databases make backup-mariadb make backup-postgres backup-mariadb: mkdir -p services/mariadb/backups $(DC) exec database sh -c "mysqldump -u$$MARIADB_USER -p$$MARIADB_PWD $$MEDIAWIKI_DB_NAME" > services/mariadb/backups/backup_$(shell date +%F_%T).sql backup-postgres: mkdir -p services/postgres/backups $(DC) exec datawarehouse pg_dump -U $$DATABASE_USERNAME $$DATABASE_NAME > services/postgres/backups/backup_$(shell date +%F_%T).sql </pre>
Summary:
Please note that all contributions to UNITApedia are considered to be released under the Creative Commons Zero (public domain) (see
UNITApedia:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Debug data: