Yuanji's Wiki

人間は考える葦である

用户工具

站点工具


侧边栏

本页面的其他翻译:
zh

Return Home

Contact

wiki:install

这是本文档旧的修订版!


Install DokuWiki

The following instruction is used by Yuanji's Wiki.

Use docker-compose

Download docker-compose.yml

note: you should edit environment variables to meet your own needs.

docker-compose.yml
version: '2'
services:
  dokuwiki:
    image: 'bitnami/dokuwiki:0'
    restart: always
    ports:
      - '27721:80'
    environment:
      DOKUWIKI_USERNAME: 'gimo'
      DOKUWIKI_FULL_NAME: 'Yuanji Jiang'
      DOKUWIKI_PASSWORD: 'wiki'
      DOKUWIKI_EMAIL: 'self@gimo.me'
      DOKUWIKI_WIKI_NAME: "Yuanji's Wiki"
    volumes:
      - 'dokuwiki_data:/bitnami'
volumes:
  dokuwiki_data:
    driver: local

Create & start containers

docker-compose up -d

Backup DokuWiki's volume

docker-compose stop
docker run --rm -v dokuwiki_dokuwiki_data:/data -v /opt/dokuwiki/dokuwiki_backup:/backup ubuntu tar -zcvf /backup/dokuwiki_dokuwiki_data.tar /data

Restore DokuWiki's volume

docker volume create dokuwiki_dokuwiki_data

docker run -v dokuwiki_dokuwiki_data:/bitnami --name dummy_dokuwiki ubuntu /bin/bash
docker run --rm --volumes-from dummy_dokuwiki -v $(pwd):/backup ubuntu bash -c "cd /bitnami && tar xvf /backup/dokuwiki_dokuwiki_data.tar --strip 1"

References

wiki/install.1573970495.txt.gz · 最后更改: 2019/11/17 15:01 JST 由 gimo