Memos 官网

Memos Git

Docker安装

docker pull neosmemo/memos:latest
docker run -d --name memos --restart=always -p 5230:5230 -v /root/docker/memos/:/var/opt/memos neosmemo/memos:latest

数据卷目录

.memos 目录

Nginx 反代

location ^~ /
{
    proxy_pass http://127.0.0.1:5230;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    add_header X-Cache $upstream_cache_status;
    # cache
    add_header Cache-Control no-cache;
    expires 12h;
}

Memos如何升级

停止运行Memos
docker stop memos

删除现有Memos
docker container rm memos

获取最新镜像
docker pull neosmemo/memos:latest

安装最新版本
docker run -d --name memos -p 5230:5230 -v /root/docker/memos:/var/opt/memos neosmemo/memos:latest

Memos备份

tar -zcvf memos_$(date +%Y-%m-%d).tar.gz /root/docker/memos

docker-compose
新建了data数据文件夹

version: "3.3"

services:

  memos:
    image: neosmemo/memos:latest
    container_name: memos
    ports:
      - "5230:5230"  
    init: true
    volumes:
      - ./data:/var/opt/memos
    restart: unless-stopped
如果觉得我的文章对你有用,请随意赞赏