version: "3"
services:
wiki:
image: ghcr.io/requarks/wiki:2
environment:
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: wikijs
DB_PASS: <password_of_pguser_here>
DB_NAME: wikijs-db
restart: unless-stopped
ports:
- "10000:3000"
Dump the database using pg_dump
or pg_dump.exe
:
PS> cd "C:\Program Files\PostgreSQL\13\bin"
PS> pg_dump.exe --file "wikijs.dump" --host "localhost" --port "5432" --username "postgres" --no-password --verbose --format=c --blobs "wikijs-db"
wikijs@docker: ~$ docker-compose down
wikijs@docker: ~$ docker container prune
wikijs@docker: ~$ docker image prune
wikijs@docker: ~$ docker-compose pull
wikijs@docker: ~$ docker-compose up -d
wikijs
using pgAdminwikijs-db
:
wikijs
userUTF-8
C:\Program Files\PostgreSQL\13\data\pg_hba.conf
and add the IP of the Docker host:# TYPE DATABASE USER ADDRESS METHOD
host wikijs-db wikijs xxx.xxx.xxx.xxx/32 scram-sha-256
wikijs-db
, select Restore..
:
wikijs
postgres
will remain in the database dump file when doing the backup.