Git Product home page Git Product logo

alfile's Introduction

Deprecated | 此项目已废弃

鸣谢

概述

本项目用于在 Choreo 免费服务上部署 Alist。需要在 Cloudflare 上有一个托管的域名才可使用。

注意

请勿滥用,账号封禁风险自负

变量

对部署时设定的变量做如下说明。

变量 默认值 说明
ArgoJSON `` 必填,Cloudflared 隧道 JSON 文件内容
DATABASE_URL `` 必填,数据库连接 URL
SITE_URL `` 网站URL,比如 https://example.com ,这个地址会在 Alist 程序中的某些地方使用。

更多变量及说明请参考:

https://github.com/alist-org/alist/blob/main/internal/conf/config.go

https://alist.nn.ci/zh/config/configuration.html

数据持久化

需要连接 MySQL 或是 PostgreSQL 数据库。

bit.to 免费 PostgreSQL 数据库
  1. 前往 https://bit.io/ 注册账号,并新建一个数据库。
  2. 点击数据库名称,进入数据库管理页面,点击左侧的 Connection,复制 "Postgres Connection" 下方字符串即为数据库连接 URL。
planetscale.com 免费 MySQL 数据库
  1. 前往 https://planetscale.com 注册账号,并新建一个数据库。
  2. 点击数据库名称,进入数据库管理页面,点击左侧的 Connect,在 "connect with" 下拉菜单中选择 Symfony。
  3. 下方 "mysql://" 开头字符串即为数据库连接 URL。密码只会显示一次,如果忘记保存了可以点击 "New password" 重新生成。

配置 Cloudflared 隧道

详情
  1. 前提在 Cloudflare 上有一个托管的域名,以example.com为例。以下为 Windows 系统命令举例。

  2. 下载 Cloudflared

  3. 运行 cloudflared login,此步让你绑定域名。

    .\cloudflared-windows-amd64.exe login
    
  4. 运行 cloudflared tunnel create 隧道名,此步会生成隧道 JSON 配置文件。

    .\cloudflared-windows-amd64.exe tunnel create mytunnel
    
  5. 运行 cloudflared tunnel route dns 隧道名 argo.example.com, 生成cname记录,可以随意指定三级域名。

    .\cloudflared-windows-amd64.exe tunnel route dns mytunnel mytunnel.example.com
    
  6. 部署时将 JSON 隧道配置文件内容填入 ArgoJSON 变量。

部署方式

请勿使用本仓库直接部署

  1. 点击本仓库右上角Fork,再点击Create Fork。

  2. 在Fork出来的仓库页面上点击Setting,勾选Template repository。

  3. 然后点击Code返回之前的页面,点Setting下面新出现的按钮Use this template,起个随机名字创建新库。

  4. 登陆 console.choreo.dev ,然后新建一个 service ,并且授权 Choreo app 连接上面新建的仓库。

image

  1. 选择 Dockerfile,Dockerfile Path 填入 /Dockerfile , 点击 Create 。

image

  1. 点击 Configs and Secrets , 选择 Secret 和 Environment Variables, 点击 next 。

image

  1. 按之前的说明设置环境变量,点击 create 。

image

  1. 点击 Build and Deploy ,点击 Deploy Manually ,网页右侧会弹出提示,再点击 Deploy。

  2. 稍等一会儿后,再点击网页左侧 Observe,日志会显示 Alist 初始密码。如果没有显示,再等一会儿刷新网页。

alfile's People

Contributors

yabalaya avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.