Code Monkey home page Code Monkey logo

metakgp-wiki's Introduction

Metakgp Wiki Setup

Build Status

Dockerized for fun and profit.

New to Docker? See the Runbook for some useful recipes.

Note: This readme is for development only, refer to the Runbook for commands to use in production.

Contents

Installation instructions for prerequisites

Quick start

Create a .env file at the repo root and add all the secrets.

cp .env.template .env

Note: Required environment variables:

  • MYSQL_PASSWORD
  • SERVER_NAME
  • SERVER_PORT

Other variables inside .env.template are optional.

Start all the basic services

Note: Depending on how you installed docker, you might have to run the docker commands through sudo

docker-compose up --build -d

Monitor the output to make sure nothing failed.

docker-compose logs -f

Now you need to initialise the database. Pick one of the following options.

Option 1: Run the web installer

Remove LocalSettings.php

docker-compose exec php rm /srv/mediawiki/LocalSettings.php

Go to http://localhost:8080 and complete the web installation. The database user is metakgp_user and the database host is mysql-docker. All the other configuration should be exactly the same as your .env file.

After completing the installation, download the generated LocalSettings.php file and move it into place.

docker cp <path to downloaded LocalSettings.php> $(docker-compose ps -q php):/srv/mediawiki

Create the tables necessary for extensions.

docker-compose exec php php /srv/mediawiki/maintenance/update.php

Reload http://localhost:8080, you should see the main page.

Option 2: Restore from backup

Note: This is for production, no need to run this for development

Check the Runbook


Go to http://localhost:8080, you should see the main page.

Development

Compose configuration

docker-compose supports multiple configuration files. docker-compose.yml is the base config, and docker-compose.override.yml is the default override. This is set up so that while developing, you can just use docker-compose <command>, and it will work.

For production, we want to run some additional services (like backups), so we need to specify docker-compose.prod.yml as an additional override.

For integration tests, we want to make sure that volumes created during integration tests don't overwrite volumes being used for development. We use test/integration/docker-compose.test.yml as the override instead.

Overrides can be applied by using the -f option. See test/integration/run_tests.sh for an example.

docker-compose -f docker-compose.yml -f <another compose file>

Volumes

We use Docker volumes to persist data between container rebuilds (eg. mysql database), and to share data between containers (eg. mediawiki volume shared between nginx and php).

When rebuilding/restarting containers, keep in mind that volumes are not automatically recreated. If a volume already exists, it will be attached to the new container. If you want a "clean" build, you need to make sure any existing volumes are removed.

List volumes:

docker-compose volume ls

Remove the volumes you want to recreate:

docker-compose volume rm <volume name>

Todo

Check the issues dashboard.

Contributing

Please read CONTRIBUTING.md guide to know more.

Helping PRs

This section lists PRs that can be viewed as example for performing particular updates or maintenance tasks.

  • How to change captcha service used with ConfirmEdit extension. #56
  • How to upgrade mediawiki version. #60

metakgp-wiki's People

Contributors

amrav avatar icyflame avatar kulttuuri avatar thealphadollar avatar meneth avatar hargup avatar themousepotato avatar defcon-007 avatar nishnik avatar cdhowie avatar renovate-bot avatar jacksga avatar renovate[bot] avatar

Watchers

James Cloos avatar  avatar

Forkers

gitter-badger

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.