This repository contains database backups that are to be used as seed data for Pixel. Since this repo is hosted on github pages, its files can be downloaded via https://wikimedia.github.io/pixel-seed-data/name-of-file.
Let's say you're trying to add a new wiki page to Pixel. You would follow these steps:
- Make sure you are on on the latest version of Pixel (including the latest database changes) and have a fresh copy of the database seed data by running
./pixel.js update
(from Pixel's root directory and after yougit checkout
themain
branch) before making any desired changes. - Run
./pixel.js reference
to pull the latest code changes from MediaWiki. Then visitlocalhost:3000/wiki/<your-new-page>
in your browser, and click the "Create" tab to create your page, etc. to do any other actions you wish that will affect the database. - In Pixel's root directory, run
npm run db:save
. This will generate a physical backup of the database Pixel uses and will save it in a folder calledbackups
located in Pixel's root directory. - Drag and drop the
tar
file located in thebackups
directory anywhere on the page at https://github.com/wikimedia/pixel-seed-data. Github will upload the file and ask you to commit it to the main branch of this repo. Click "Commit changes". - IMPORTANT: Wait for the CI Job to pass before proceeding to the next step. It can take awhile (5 - 10 minutes) before the file is available to be downloaded.
- Edit Pixel's Dockerfile.database file with the name of the
tar
file. Commit this change and create a pull request in Pixel to merge this change into Pixel'smain
branch. - After the pull request has been merged, locally checkout the
main
branch in Pixel and run./pixel.js update
to rebuild the Docker database image/volume with your changes. - Confirm your database changes are live by running
./pixel.js reference
and visiting the server Pixel sets up atlocalhost:3000
. - Pixel runs hourly reports via a cron job at https://pixel.wmcloud.org/. On the next run, Pixel will automatically pull down the latest database image without any manual intervention if everything is working correctly.