使用fly.io部署memos
•分享
252 0
是一个好玩的应用
是一个免费的服务
拥有3个256MB内存的免费额度和3G的硬盘空间
https://github.com/hu3rror/memos-on-fly
用以部署memos
https://www.backblaze.com/cloud-storage
Install flyctl
WINDOWS
pwsh -Command "iwr https://fly.io/install.ps1 -useb | iex"
flyctl launch
添加以下
[build]
image = "ghcr.io/hu3rror/memos-litestream:latest"
[env]
# Details see: https://litestream.io/guides/backblaze/
LITESTREAM_REPLICA_BUCKET = "B2C桶名称" # change to your litestream bucket name
LITESTREAM_REPLICA_ENDPOINT = "s3.us-east-005.backblazeb2.com" # change to your litestream endpoint url
LITESTREAM_REPLICA_PATH = "memos_prod.db" # keep the default or change to whatever path you want
[[mounts]]
source = "memos_data"
destination = "/var/opt/memos"
[http_service]
internal_port = 5230
force_https = true
auto_stop_machines = false
auto_start_machines = true
min_machines_running = 0
flyctl volumes create memos_data --region hkg --size 1
将B2存储的密钥添加到fly的密钥存储中
flyctl secrets set LITESTREAM_ACCESS_KEY_ID="<keyId>" LITESTREAM_SECRET_ACCESS_KEY="<applicationKey>"
flyctl deploy