Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/requarks/wiki-update-companion
Automatic Update Companion for Wiki.js
https://github.com/requarks/wiki-update-companion
docker nodejs wiki wiki-js
Last synced: 2 months ago
JSON representation
Automatic Update Companion for Wiki.js
- Host: GitHub
- URL: https://github.com/requarks/wiki-update-companion
- Owner: requarks
- License: gpl-3.0
- Created: 2022-05-05T22:33:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-04T14:11:01.000Z (about 2 years ago)
- Last Synced: 2024-04-14T20:22:23.455Z (9 months ago)
- Topics: docker, nodejs, wiki, wiki-js
- Language: JavaScript
- Homepage: https://js.wiki
- Size: 41 KB
- Stars: 5
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wiki.js Update Companion
This docker image provides automated upgrade to latest Wiki.js versions from the Administration Area.
It's part of the [DigitalOcean prebuilt Wiki.js droplet](https://marketplace.digitalocean.com/apps/wiki-js?refcode=5f7445bfa4d0) and is installed when following the [Ubuntu installation instructions](https://docs.requarks.io/install/ubuntu).
## Usage
When a new version of Wiki.js is available, go the **System** page in the **Administration Area** of your Wiki.js installation.
Simply click the **Perform Upgrade** button to perform the upgrade.
## Technical Reference
The wiki-update-companion container exposes a small HTTP API to the Wiki.js container *(and only the container, not to the host)*.
By sending a POST request to `http://wiki-update-companion/upgrade`, the following actions are taken:
1. Stop and remove the `wiki` container
1. Pull the latest wiki image
1. Recreate the `wiki` container using the same settings as the previous containerThe major version to use for the upgrade can be specified by adding it to the URL, e.g.:
```
http://wiki-update-companion/upgrade/3
```
The default is `2` if not provided.For security reasons, this mechanism is not part of the main Wiki.js docker image, because it would require the Docker socket to be mapped into the container. A compromised Wiki.js instance would effectively give full access to other containers on the host. By using a separate isolated container, which only exposes a single HTTP endpoint internally, this potential security risk is eliminated.
The wiki-update-companion container must:
- Have the hostname `wiki-update-companion`
- Be on the same network as the `wiki` container
- Have the host `/var/run/docker.sock` socket mapped to the container in the same location