自建notion博客搭建-Docker nobelium

date
May 19, 2022
slug
newservice-docker-notion-nobelium
status
Published
summary
新服务-
tags
service
type
Post
URL

Summary

  • 但这次用docker
notion image

Docker搭建


export DOCKER_PORT=18300
export DOCKER_PROJ=nobelium-notion
cd /data
git clone https://github.com/craigary/nobelium $DOCKER_PROJ
cd $DOCKER_PROJ

cat > NOTION_PAGE_ID <<EOF
put-in-your-notion-page-id
EOF
export NOTION_PAGE_ID=$(cat ./NOTION_PAGE_ID)

export IMAGE=nobelium:latest

# 需要把Dockerfile 的第一行去掉,不然后出错

# build with docker
docker build -t ${IMAGE} --build-arg NOTION_PAGE_ID .

docker run -dit -d \
  --name=$DOCKER_PROJ \
  --network npm_nginx_proxy_manager-network \
  -p $DOCKER_PORT:3000 \
  -e TZ=Asia/Hong_Kong \
  -e NOTION_PAGE_ID=${NOTION_PAGE_ID} \
  --restart always \
  nobelium:latest

sleep 1s; docker logs -f $DOCKER_PROJ
notion image
notion image
 

验证


© Ying Bun 2021 - 2024