MirrorNest
← Tous les guides

MediaWiki

The open-source wiki software that powers Wikipedia itself — the standard choice for a large, heavily-cross-referenced, community-editable knowledge base.

Système : Any Docker hostwikidocumentationself-hostedSite officiel ↗Documentation officielle ↗
Ce guide est élaboré à partir de la documentation officielle de MediaWiki, dont le lien figure ci-dessus — vérifiez toujours les noms exacts des paquets/versions avant d'exécuter ces commandes sur un serveur de production, car les versions de la distribution et du projet évoluent avec le temps.
  1. 1Run MediaWiki with a database via Compose

    MediaWiki needs a database (MySQL/MariaDB shown here) and persistent storage for its images/extensions.

    cat <<'EOF' > docker-compose.yml services: db: image: mariadb:11 environment: MARIADB_DATABASE: mediawiki MARIADB_USER: mediawiki MARIADB_PASSWORD: changeme MARIADB_ROOT_PASSWORD: changeme_root volumes: - ./mediawiki/db:/var/lib/mysql mediawiki: image: mediawiki:latest depends_on: - db ports: - "8085:80" volumes: - ./mediawiki/images:/var/www/html/images restart: unless-stopped EOF
    docker compose up -d
  2. 2Run the web-based installer

    Visiting the site for the first time launches MediaWiki's setup wizard, which generates a LocalSettings.php file to download and place back into the container.

    http://your-server-ip:8085
  3. 3Copy LocalSettings.php into the container

    The installer generates this config file for you to download, then it needs to be copied into the running container's webroot to finish setup.

    docker cp LocalSettings.php mediawiki-mediawiki-1:/var/www/html/LocalSettings.php