开源永久免费的 Memos 服务搭建
预览 安装 已安装docker compose 新建目录memos,新建文件docker-compose.yml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 version: "3.0" services: memos: image: ghcr.io/usememos/memos:0.18.0 container_name: memos restart: always volumes: - ./memos/:/var/opt/memos environment: - MEMOS_DRIVER=mysql - MEMOS_DSN=root:password@tcp(db:3306)/memos_prod command: ["--metric=false"] depends_on: - db db: image: mysql:8.2.0 container_name: mysql restart: always env_file: .db.env volumes: - ./mysql_data:/var/lib/mysql caddy: image: caddy:2.7.5 container_name: caddy restart: unless-stopped ports: - "80:80" - "443:443" - "443:443/udp" volumes: - ./Caddyfile:/etc/caddy/Caddyfile - ./caddy/site:/srv - ./caddy/caddy_data:/data - ./caddy/caddy_config:/config depends_on: - memos 创建.db.env,修改为自己的数据库密码 1 2 3 4 MYSQL_RANDOM_ROOT_PASSWORD=yes MYSQL_DATABASE=memos_prod MYSQL_USER=yourusername MYSQL_PASSWORD=yourpassword 创建Caddyfile,memos修改为你的域名 1 2 3 memos.com { reverse_proxy memos:5230 } 执行docker-compose up -d启动 配置 访问域名打开网站,设置一个管理员账户 自定义css 修改发文字体为其他 1 2 3 4 5 6 7 8 @font-face { font-family: 'font'; src: url('https://www.font.woff') format('woff'); } .memo-content-text { font-family: 'font', sans-serif; } 配置 Cloudflare R2 存储 详细教程Configuring Cloudflare R2 Storage - Memos 存储路径处可以设置{year}/{month}/{timestamp}_{filename}以文件夹方式存储保存在R2上的内容...