Skip to content

Commit

Permalink
Make README match configuration options
Browse files Browse the repository at this point in the history
  • Loading branch information
GAsplund committed Aug 12, 2024
1 parent 4bb6c40 commit 91a6b9f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ Includes a proxy that helps routing to sub-paths.

# Usage with Gamma

In order to authorize with Gamma, create a client with a redirect URL that matches `https://[URL of wiki]/wiki/index.php/Special:PluggableAuthLogin`.
In order to authorize with Gamma, create a client with a redirect URL that matches `https://[URL of wiki]/[wiki path]/Special:PluggableAuthLogin`.
Also make sure that the email scope is enabled.
If you want to make any restrictions on who can access the wiki, you can set those directly on the client.
The wiki will not do any additional checks other than login status.

# Wiki Setup

After creating a blank software stack (e.g. through Docker compose), you should be able to access the wiki through the proxy at http://localhost:4000/wiki, or directly at http://localhost:4001.
The wiki can now be initialized by navigating to http://localhost:4000/wiki/mw-config and following the instructions.
After creating a blank software stack (e.g. through Docker compose), you should be able to access the wiki through the proxy at `http://localhost:4000/[wiki path]`, or directly at `http://localhost:4001/[wiki path]`.
Note that doing the latter requires setting `ROOT_URL` to match the non-proxied version, or else all further links will incorrectly lead to the proxied version.
The wiki can now be initialized by navigating to `http://localhost:4000/[wiki path]/mw-config` and following the instructions.
Should you encounter a 404 error when clicking continue, navigate directly to the wiki setup page at http://localhost:4001/mw-config.

If there are any database-related errors after initialization, run the upgrade script: `php maintenance/update.php`.
Expand All @@ -23,12 +24,14 @@ More information about this update script can be found in MediaWiki's [documenta
> [!WARNING]
> Make sure that there exists a backup of the database before running the upgrade script.
## Upgrating from previous versions
## Upgrading from Previous Versions

If you are upgrading from version < 1.39, you will need to run the upgrade script to create new database tables used by new extensions: `php maintenance/update.php`.

## Configuration

### Environment Variables

The following environment variables can be set to configure the wiki:

| Variable | Description | Default | Example |
Expand All @@ -52,3 +55,8 @@ The following environment variables can be set to configure the wiki:
| `WORDMARK_WIDTH` | Width of the wordmark (max 124) | `124` | `64` |
| `WORDMARK_HEIGHT` | Height of the wordmark (max 32) | `32` | `32` |
| `DEFAULT_SKIN` | Default skin to use. Is also displayed for non-logged in users | `citizen` | `vector-2022` |

### Choosing a Path

If you want to host the wiki under a subdirectory, setting the `WIKI_PATH` environment variable to the desired path will make the wiki accessible at `http://localhost:4000/[wiki path]`.
If you want to host the wiki at the root, set `WIKI_PATH` to an empty string.

0 comments on commit 91a6b9f

Please sign in to comment.