一、Docker、Docker-Compose安装

https://www.cnblogs.com/a120608yby/p/9883175.html
https://www.cnblogs.com/a120608yby/p/14582853.html

二、基于Docker-Compose部署WiKi.js

# vim docker-compose.yml
version: "3"
services:
  db:
    image: postgres:11-alpine
    environment:
      POSTGRES_DB: wiki
      POSTGRES_PASSWORD: wikijsrocks
      POSTGRES_USER: wikijs
    logging:
      driver: "none"
    restart: unless-stopped
    volumes:
      - ./data:/var/lib/postgresql/data
    ports:
      - "5432:5432"
    networks:
      - ops_default

  wiki:
    image: ghcr.io/requarks/wiki:2
    depends_on:
      - db
    environment:
      DB_TYPE: postgres
      DB_HOST: db
      DB_PORT: 5432
      DB_USER: wikijs
      DB_PASS: wikijsrocks
      DB_NAME: wiki
    restart: unless-stopped
    ports:
      - "80:3000"
    networks:
      - ops_default

networks:
  ops_default:
    external: true

三、启动服务

docker compose up -d

四、查看服务启动状态

docker compose ps

五、登录及初始化

  首次登录配置的账号为管理员,输入完成后,点击"INSTALL",开始初始化配置

   语言、时区设置

 

 

参考:https://github.com/requarks/wiki

posted on 2023-01-17 15:34  a120608yby  阅读(692)  评论(0编辑  收藏  举报