{"id":15134688,"url":"https://github.com/metakgp/metakgp-wiki","last_synced_at":"2025-10-23T11:30:38.794Z","repository":{"id":47713626,"uuid":"91416801","full_name":"metakgp/metakgp-wiki","owner":"metakgp","description":"Dockerized source for the metakgp wiki.","archived":false,"fork":false,"pushed_at":"2025-01-02T16:01:40.000Z","size":880,"stargazers_count":23,"open_issues_count":15,"forks_count":20,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-27T10:51:30.465Z","etag":null,"topics":["docker","hacktoberfest","mediawiki","metakgp","nginx","php","server"],"latest_commit_sha":null,"homepage":"https://wiki.metakgp.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metakgp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-16T05:16:55.000Z","updated_at":"2025-01-02T16:01:44.000Z","dependencies_parsed_at":"2023-11-27T14:29:41.264Z","dependency_job_id":"8f17724d-0e22-4260-86c8-10ad58a68d58","html_url":"https://github.com/metakgp/metakgp-wiki","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metakgp%2Fmetakgp-wiki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metakgp%2Fmetakgp-wiki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metakgp%2Fmetakgp-wiki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metakgp%2Fmetakgp-wiki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metakgp","download_url":"https://codeload.github.com/metakgp/metakgp-wiki/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236396249,"owners_count":19142170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","hacktoberfest","mediawiki","metakgp","nginx","php","server"],"created_at":"2024-09-26T05:23:47.348Z","updated_at":"2025-10-23T11:30:38.788Z","avatar_url":"https://github.com/metakgp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003cdiv align=\"center\"\u003e\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n[![Wiki][wiki-shield]][wiki-url]\n\n\u003c/div\u003e\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/metakgp/metakgp-wiki\"\u003e\n    \u003cimg width=\"140\" alt=\"image\" src=\"https://raw.githubusercontent.com/metakgp/design/main/logos/logo.jpg\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eMetaKGP Wiki\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003ci\u003eDockerized for fun and profit.\u003c/i\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://wiki.metakgp.org\"\u003eWiki\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/metakgp/metakgp-wiki/issues\"\u003eReport Bug / Request Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eTable of Contents\u003c/summary\u003e\n\n- [About](#about-the-project)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Deployment](#deployment)\n    - [Development](#development)\n    - [Production](#production)\n    - [Environment Variables](#environment-variables)\n    - [Setting Up Secondary Services](#setting-up-secondary-services)\n- [Runbook](./RUNBOOK.md)\n- [Maintainer(s)](#maintainers)\n- [Contact](#contact)\n- [Additional documentation](#additional-documentation)\n\n\u003c/details\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About\nThis is the dockerized source for the MetaKGP Wiki deployed at https://wiki.metakgp.org. The wiki is a [Mediawiki](https://mediawiki.org) instance with some extensions and services that take backups and update certain pages.\n\nIt is hosted on a DigitalOcean droplet with 2GB RAM and a single CPU. See [MetaPloy](https://github.com/metakgp/metaploy) for the deployment architecture.\n\n### Architecture\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Getting Started\nSee also: [The Runbook](./RUNBOOK.md) for a quick reference to processes needed to manage a production wiki.\n\n### Prerequisites\nDocker and docker compose are the only required dependencies. You can either install [Docker Desktop](https://docs.docker.com/get-docker/) or the [Docker Engine](https://docs.docker.com/engine/install/). For minimal installations and production use cases, Docker Engine is recommended.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Deployment\n\u003e **NOTE**: See the [#Production](#production) section for production deployment. DO NOT follow the development instructions in a production environment.\n\n#### Development\n0. Set up [MetaPloy](https://github.com/metakgp/metaploy).\n1. Clone this repository.\n2. Copy the contents of the `.env.template` file into the `.env` file. Create the file if it doesn't exist.\n3. Set the necessary [environment variables](#environment-variables).\n4. Run `docker compose up` to start the wiki. The wiki will be accessible on `localhost:8080` or whichever port MetaPloy is set to use.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n#### Production\n0. Set up [MetaPloy](https://github.com/metakgp/metaploy) **for production**.\n1. Clone this repository at a convenient location such as `/deployments`.\n2. Set the appropriate **production** [environment variables](#environment-variables) in the `.env` file.\n3. Run `docker compose -f docker-compose.prod.yml up` to start the wiki. This enables the `jobs` service which includes backups, log rotation, and other periodic jobs.\n4. Optionally set up a Systemd service to start the wiki on startup.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n#### Environment Variables\nEnvironment variables can be set using a `.env` file(use `.env.template` file for reference). The following variables are used:\n\n- `DEV`: When set to `true`, Mediawiki PHP stack-trace is shown with error messages. (Default: `false`)\n- `MYSQL_PASSWORD`: A secret password for the MySQL database.\n- `SERVER_PORT`: Port on which the wiki server is exposed to the host. (Default: `8080`)\n- `SERVER_NAME`: Base URL of the wiki (eg: `https://wiki.metakgp.org`).\n- `ALLOW_IP_RANGE`: A [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) specifying a range of IP addresses to explicitly unblock from spam filters. Currently only supports a single range. (eg: `127.0.0.0/24`)\n- `MAILGUN_EMAIL`: The email ID used for sending emails via Mailgun. (eg: `admin@wiki.metakgp.org`)\n- `MAILGUN_PASSWORD`: Mailgun SMTP password for sending official mails from the wiki.\n- `WG_SECRET_KEY`: Secret key used for encryption by mediawiki. Make it a long, random, secret string ([Reference](https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgSecretKey)).\n- Dropbox related variables (used for storing backups) (See [this](#dropbox-backups) section for details):\n\t- `DROPBOX_APP_KEY`:  Dropbox app key (can be found at [Dropbox App Console](https://www.dropbox.com/developers/apps)).\n\t- `DROPBOX_APP_SECRET`:  Dropbox app secret (can be found at [Dropbox App Console](https://www.dropbox.com/developers/apps)).\n\t- `DROPBOX_ACCESS_TOKEN`: Dropbox API access token (generated using `/scripts/get_dropbox_tokens.py`)\n\t- `DROPBOX_REFRESH_TOKEN`: Dropbox API refresh token (generated using `/scripts/get_dropbox_tokens.py`) used to refresh the access token.\n- `SLACK_CHANGES_WH_URL`: URL to the Slack webhook used to send updates about wiki changes. (See [this](#slack-notifications) section for more details)\n- `SLACK_INCIDENTS_WH_URL`: URL to the Slack webhook used to send incidents reports and errors(like Dropbox backup failure). (See [this](#slack-notifications) section for more details)\n- `BATMAN_BOT_PASSWORD`: A generated password of the Batman bot user account on the wiki(Mediawiki documentation to generate bot passwords can be found [here](https://www.mediawiki.org/wiki/Manual:Pywikibot/BotPasswords)).\n\n#### Setting Up Secondary Services\n##### Dropbox Backups\nThe `jobs` service runs periodic local backups (see `/jobs/backups`) and stores the last 30 days of backups on [Dropbox](https://dropbox.com). To set this up, a Dropbox app has to be created, and access tokens need to be generated:\n\n1. Create an app on the [Dropbox App Console](https://www.dropbox.com/developers/apps).\n2. Copy the app key and app secret and set the corresponding [environment variables](#environment-variables).\n3. Run the script `/scripts/get_dropbox_tokens.py` and when prompted, enter the app key and app secret.\n4. Set the generated API access token and refresh tokens in the environment variables.\n\n##### Slack Notifications\nThe Slack notifications are sent via [webhooks](https://api.slack.com/messaging/webhooks). Two webhooks are used by the wiki: Recent Changes webhook and Incidents webhook (See [environment variables](#environment-variables)). The recent changes webhook logs recent changes to the wiki (page edits, user creation, etc.) and the incidents webhook notifies about server incidents such as backup failures.\n\n1. Create a [Slack app](https://api.slack.com/apps/new).\n2. Enable \"Incoming Webhooks\".\n3. Copy the webhook URL and set the appropriate [environment variables](#environment-variables).\n\n##### Mailgun\n[Mailgun](https://www.mailgun.com/) is used by the wiki as a mailing service for sending various emails to the users such as account verification and notifications.\n\n1. Add a new domain in the \"Sending\" section on Mailgun.\n2. [Copy](https://help.mailgun.com/hc/en-us/articles/203380100-Where-Can-I-Find-My-API-Key-and-SMTP-Credentials) the SMTP password and set the appropriate [environment variables](#environment-variables).\n\n##### PyWikiBot (Batman)\n[PyWikiBot](https://github.com/wikimedia/pywikibot) is a Python library that interfaces with the wiki as a bot (called \"Batman\") and is used to run various jobs such as updating the trending pages list. See `/jobs/pywikibot` for a list of scripts.\n\n1. [Create](https://www.mediawiki.org/wiki/Manual:Creating_a_bot) a bot account on the Wiki.\n2. Add the bot's password to the `BATMAN_BOT_PASSWORD` variable in the [environment variables](#environment-variables).\n\n##### Google Analytics\n**The legacy google analytics features used here are now deprecated. This needs to be reworked.**\n\n## Maintainer(s)\n- [Harsh Khandeparkar](https://github.com/harshkhandeparkar)\n\n## Past Maintainer(s)\n- [Rajiv Harlalka](https://github.com/rajivharlalka)\n- [Arpit Bhardwaj](https://github.com/proffapt)\n- [Shivam Kumar Jha](https://github.com/thealphadollar)\n- [Siddharth Kannan](https://github.com/icyflame)\n- [Vikrant Varma](https://github.com/amrav)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Contact\n\u003cp\u003e\n📫 Metakgp -\n\u003ca href=\"https://bit.ly/metakgp-slack\"\u003e\n  \u003cimg align=\"center\" alt=\"Metakgp's slack invite\" width=\"22px\" src=\"https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/slack.svg\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"mailto:metakgp@gmail.com\"\u003e\n  \u003cimg align=\"center\" alt=\"Metakgp's email \" width=\"22px\" src=\"https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/gmail.svg\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://www.facebook.com/metakgp\"\u003e\n  \u003cimg align=\"center\" alt=\"metakgp's Facebook\" width=\"22px\" src=\"https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/facebook.svg\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://www.linkedin.com/company/metakgp-org/\"\u003e\n  \u003cimg align=\"center\" alt=\"metakgp's LinkedIn\" width=\"22px\" src=\"https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/linkedin.svg\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://twitter.com/metakgp\"\u003e\n  \u003cimg align=\"center\" alt=\"metakgp's Twitter \" width=\"22px\" src=\"https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/twitter.svg\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://www.instagram.com/metakgp_/\"\u003e\n  \u003cimg align=\"center\" alt=\"metakgp's Instagram\" width=\"22px\" src=\"https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/instagram.svg\" /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Additional documentation\n  - [License](/LICENSE)\n  - [Code of Conduct](/.github/CODE_OF_CONDUCT.md)\n  - [Security Policy](/.github/SECURITY.md)\n  - [Contribution Guidelines](/.github/CONTRIBUTING.md)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\n[contributors-shield]: https://img.shields.io/github/contributors/metakgp/metakgp-wiki.svg?style=for-the-badge\n[contributors-url]: https://github.com/metakgp/metakgp-wiki/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/metakgp/metakgp-wiki.svg?style=for-the-badge\n[forks-url]: https://github.com/metakgp/metakgp-wiki/network/members\n[stars-shield]: https://img.shields.io/github/stars/metakgp/metakgp-wiki.svg?style=for-the-badge\n[stars-url]: https://github.com/metakgp/metakgp-wiki/stargazers\n[issues-shield]: https://img.shields.io/github/issues/metakgp/metakgp-wiki.svg?style=for-the-badge\n[issues-url]: https://github.com/metakgp/metakgp-wiki/issues\n[license-shield]: https://img.shields.io/github/license/metakgp/metakgp-wiki.svg?style=for-the-badge\n[license-url]: https://github.com/metakgp/metakgp-wiki/blob/master/LICENSE\n[wiki-shield]: https://custom-icon-badges.demolab.com/badge/metakgp_wiki-grey?logo=metakgp_logo\u0026logoColor=white\u0026style=for-the-badge\n[wiki-url]: https://wiki.metakgp.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetakgp%2Fmetakgp-wiki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetakgp%2Fmetakgp-wiki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetakgp%2Fmetakgp-wiki/lists"}