在Fly.io上部署Alist网盘程序

韩小韩
2022-12-04 / 13 评论 / 848 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2022年12月04日,已超过507天没有更新,若内容或图片失效,请留言反馈。

关于收费

Fly.io 是提供一定限额的免费使用额度的,他们的目标就是让小型的应用可以免费运行,而在需要扩展的时候支付一定的费用,而这笔费用也不会太昂贵。Fly.io 的应用会根据使用情况单独计费。
Fly.io 会根据单个用户或者组织计费,官方也说了,如果想要更多免费的应用,那么你可以创建多个组织。

分类限额说明
VM: shared-cpu每个月 2340 小时可以全天候运行 3 个 256 MB 内存的共享 CPU 的 VM
Volumes3GB提供 3GB 永久存储
Bandwidth160 GB/每月根据各个地方不同分别计算 outbound 流量
Anycast IPs无限的 IPv6, 每个应用一个 IPv4每一个额外的 IPv4 地址需要额外每个月 $2
Certificates10 个活跃的证书最多 10 个证书

搭建准备

Fly.io 自身的文档已经提供了 Docker 应用部署流程

安装 flyctl

Fly.io 的大多数操作需要使用命令行,所以先要安装命令行工具 flyctl。
安装方式可以参考官方文档:

# Mac(Brew安装)
brew install flyctl
# Mac (直接安装)
curl -L https://fly.io/install.sh | sh
# Linux
curl -L https://fly.io/install.sh | sh
# Windows (Run the Powershell install script)
iwr https://fly.io/install.ps1 -useb | iex

在Fly.io上部署Alist网盘程序

注册登陆

# 注册
flyctl auth signup
# 登陆
flyctl auth login

创建应用

# 创建应用
git clone https://github.com/alist-org/alist-render
cd alist-render
flyctl launch
# 创建一个 1G 的持久存储空间(最小单位 1)
flyctl volumes create data --size 1 --app APP_NAME

在Fly.io上部署Alist网盘程序

修改配置(fly.toml)

# 端口修改为 5244
[[services]]
http_checks = []
internal_port = 5244
# 添加Alist数据目录
[mounts]
destination = "/opt/alist/data"
source = "data"

在Fly.io上部署Alist网盘程序

部署应用

准备工作已经完成,现在可以部署 alist 应用,输入以下命令

flyctl deploy --remote-only

如果部署顺利(看到 deploved successfully),之后就可以用以下命令打开应用:

flyctl open

部署的时候,日志会显示密码,如果没有保存,可以在后台日志里面看

https://fly.io/apps/APP_NAME/monitoring

绑定域名

查看成品

参考: https://cuojue.org/read/deploy-alist-in-flyio.html

0

评论 (13)

取消
  1. 头像
    kaiseiku
    Windows 10 Windows 10 / Google Chrome Google Chrome 中国北京市昌平区联通

    太牛逼了

    回复
    1. 头像
      韩小韩 作者
      Mac OS X 10.15.7 Mac OS X 10.15.7 / Google Chrome Google Chrome 中国江苏省徐州市联通
      @ kaiseiku

      表情

      回复
  2. 头像
    Vsir
    Windows 7 Windows 7 / Google Chrome Google Chrome 中国北京市新国信通信有限公司

    这篇真不赖,受教了,去试试去。

    回复
    1. 头像
      韩小韩 作者
      Windows 10 Windows 10 / Google Chrome Google Chrome 中国江苏省南京市电信
      @ Vsir

      冲冲冲!!!

      回复
  3. 头像
    默默
    Windows 10 Windows 10 / Microsoft Edge Microsoft Edge 中国广东省东莞市电信

    请问下这种搭建AList 完全是免费的?

    回复
    1. 头像
      韩小韩 作者
      Windows 10 Windows 10 / Google Chrome Google Chrome 中国江苏省南京市电信
      @ 默默

      当然是的!

      回复
      1. 头像
        默默
        Windows 10 Windows 10 / Microsoft Edge Microsoft Edge 中国广东省东莞市电信
        @ 韩小韩

        有点麻烦,还要信用卡验证啥的!还不如用Replit搭建 简单明了表情

        回复
        1. 头像
          韩小韩 作者
          Windows 10 Windows 10 / Google Chrome Google Chrome 中国江苏省南京市电信
          @ 默默

          等你操作完再说要不要信用卡好哥们表情

          回复
          1. 头像
            默默
            Windows 10 Windows 10 / Microsoft Edge Microsoft Edge 中国广东省东莞市电信
            @ 韩小韩

            表情

            回复
  4. 头像
    酷小呵
    Windows 10 Windows 10 / Microsoft Edge Microsoft Edge 中国山东省菏泽市移动

    为什么windows没法安装呀?表情老是显示不行

    回复
    1. 头像
      韩小韩 作者
      Mac OS X 10.15.7 Mac OS X 10.15.7 / Google Chrome Google Chrome 中国江苏省南京市移动
      @ 酷小呵

      我这边只是举个例子,你可以搜索一下Windows怎么安装这个依赖,因为我本身用的Mac,所以Windows具体怎么安装,有哪些坑我也不是很清楚表情

      回复
  5. 头像
    魔法修狗
    Mac OS X 10.14.6 Mac OS X 10.14.6 / Google Chrome Google Chrome 中国天津市联通

    水印是什么工具生成的

    回复
    1. 头像
      韩小韩 作者
      Mac OS X 10.15.7 Mac OS X 10.15.7 / Google Chrome Google Chrome 中国江苏省南京市移动
      @ 魔法修狗

      PhotoBulk

      回复