Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 850 Bytes

File metadata and controls

35 lines (25 loc) · 850 Bytes

wiki.plus.or.kr

Wiki.js 2 + PostgreSQL 15. compose.yml publishes no port; the override adds the router that serves it through the traefik-compose stack at https://wiki.plus.or.kr.

Deploy

cp .env.example .env  # POSTGRES_PASSWORD
cp compose.override.yml.example compose.override.yml  # host, user: "<id -u>:<id -g>"
docker compose up -d

down -v deletes the database volume.

Backup

d=backups/$(date +%Y%m%d-%H%M%S) && mkdir -p $d
docker compose exec -T db pg_dump -U wikijs -d wiki -Fc > $d/wiki.dump
tar -C data -czf $d/wiki-data.tar.gz .

Copy them off-host.

Restore

Load the dump into a fresh database, verify, then cut over. Wiki files:

docker compose stop wiki
tar -C data -xzf backups/<timestamp>/wiki-data.tar.gz
docker compose up -d wiki