Skip to content

Instantly share code, notes, and snippets.

@unquietwiki
Created December 27, 2023 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unquietwiki/3f70589d07aec35abbf5eb9af8556421 to your computer and use it in GitHub Desktop.
Save unquietwiki/3f70589d07aec35abbf5eb9af8556421 to your computer and use it in GitHub Desktop.
wikijs update w/docker and postgres
#!/bin/sh
# NOTE: Docker documentation @ https://docs.requarks.io/install/docker
# NOTE: adjust network as needed; use "docker network ls" to help pick the correct one.
# Rebuild wiki.js instance
docker stop wiki
docker rm wiki
docker pull ghcr.io/requarks/wiki:2
docker create --name=wiki -e LETSENCRYPT_DOMAIN=example.com -e LETSENCRYPT_EMAIL=admin@example.com -e SSL_ACTIVE=1 -e DB_TYPE=postgres -e DB_HOST=db -e DB_PORT=5432 -e DB_PASS_FILE=/etc/wiki/.db-secret -v /etc/wiki/.db-secret:/etc/wiki/.db-secret:ro -e DB_USER=wiki -e DB_NAME=wiki -e UPGRADE_COMPANION=1 --restart=unless-stopped -h wiki --network=wikinet -p 80:3000 -p 443:3443 ghcr.io/requarks/wiki:2
docker start wiki
# Rebuild updater instance
docker stop wiki-update-companion
docker rm wiki-update-companion
docker pull ghcr.io/requarks/wiki-update-companion:latest
docker create --name=wiki-update-companion -v /var/run/docker.sock:/var/run/docker.sock:ro --restart=unless-stopped -h wiki-update-companion --network=wikinet ghcr.io/requarks/wiki-update-companion:latest
docker start wiki-update-companion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment