自建Wikijs Docker

date
Jun 12, 2022
slug
newservice-wikijs
status
Published
summary
新服务-
tags
service
type
Post
URL

Summary

步骤

export DOCKER_PROJ=wikijs
export DOCKER_PORT=18410
mkdir /data/$DOCKER_PROJ; cd /data/$DOCKER_PROJ

cat > docker-compose.yml <<EOF
version: "2.1"
services:
  $DOCKER_PROJ:
    image: lscr.io/linuxserver/wikijs
    container_name: $DOCKER_PROJ
    restart: unless-stopped
    environment:
      - PUID=1000        # 如何查看当前用户的PUIDPGID,直接命令行输入id就行
      - PGID=1000
      - TZ=Asia/Shanghai
    volumes:
      - ./config:/config  # 配置文件映射到本地,数据不会因为Docker停止而丢失
      - ./data:/data  # 数据映射到本地,数据不会因为Docker停止而丢失
    ports:
      - 8080:3000   # 左边的8080可以自己调整端口号,右边的3000不要改
    #ports:
    #    - '$DOCKER_PORT:3000' # 左边的8080可以自己调整端口号,右边的3000不要改
networks:
  default:
    name: npm_nginx_proxy_manager-network
    external: true
EOF

docker-compose down; docker-compose up -d; sleep 1s; docker-compose logs -f

local cache / cloudflare cache都要关闭,不然安装会有各种问题

npm nginx proxy manager配置

notion image
notion image
 
 

验证

notion image
notion image
notion image
notion image
 
 
notion image

© Ying Bun 2021 - 2024