安装思源笔记
su -
cd
mkdir sy-space
chown -R 1000:1000 /root/sy-space
docker run -v /root/sy-space:/siyuan/workspace -p 6806:6806 -u 1000:1000 b3log/siyuan --workspace=/siyuan/workspace/
升级思源笔记
docker pull b3log/siyuan:latest
docker stop CONTAINER_ID
docker run -p 6806:6806 -v /root/sy-space:/siyuan/workspace -d b3log/siyuan --workspace=/siyuan/workspace/
Nginx 代理思源笔记服务,注意需要添加 location /ws { ... }
配置以使用 WebSocket
upstream siyuan {
server 127.0.0.1:6806;
}
server {
listen 80;
server_name a.b.c;
client_max_body_size 10m;
location / {
proxy_pass http://siyuan;
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /ws {
proxy_pass http://siyuan;
proxy_read_timeout 60s;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'Upgrade';
}
}
标签:set,思源,6806,siyuan,header,proxy,workspace,Docker,搭建
From: https://www.cnblogs.com/engure/p/17090815.html