oneindex 和 onelist 相比之下 oneindex 会更丰富些,所以我选择的 oneindex,支持 README.md、HEAD.md 、 .password,等特殊文件以外,还有更多选项,包括主题、隐藏文件名、网格布局。
IBM注册
- 首先注册一个 IBM Cloud 账号
- IBM Cloud 注册地址
应用程序创建
- 创建 Cloud Foundry 应用程序
- 选择 公共应用程序创建
- 选择区域 达拉斯(白嫖)
- 选择价格套餐 256 MB(有个Bug,就有选择后,右边的创建按钮会变成升级,刷新一下就好了)
- 配置资源 oneindex 选 .php,onelist 选.go
- 应用程序名称(不撞车就行)
- 主机名会自己生成,域名建议 .us-south.cf.appdomain.cloud(国内能够访问)
- 点击创建,等待。。。
配置Git
- 进入应用程序,最右下角有个 持续交付点下查看工具链
- 服务器 就一个没得选
- 存储库类型,如果有就选 现有,如果没有,就选克隆
- 源存储库 URL 下面选(oneindex 和 onelist 的部署方式不同,当前是以 oneindex 为例)
| Name | Type | Git(源存储库 URL) | 
|---|---|---|
| Oneindex | .php | https://github.com/donwa/oneindex.git | 
| OneList | .go .py | https://github.com/0oVicero0/OneList.git | 
配置 Token
Oneindex
- 通过docker上的部署,复制出这两个文件 - /var/www/html/config/base.php- /var/www/html/config/token.php
- 上传到 Git - /web/config/下
- Git每次提交,应用程序都会重新启动 
OneList
- 切换到 AWS-Cloud-Foundry分支
- 点击访问,登录账号!授权许可!
- 复制到 config.json的token字段
页面魔改
顶部的图标和标题 /web/view/{主题名称}/layout.php1
2<title>Microsoft OneDrive</title>
<link rel="icon" href="https://p.sfx.ms/images/favicon.ico" type="image/x-icon">
列表图标和文案 /web/view/nexmoe/list.php1
folder_open 替换成 folder(空心换实心图标)
密码页面 /web/view/{主题名称}/password.php1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24<?php view::layout('layout')?>
<?php view::begin('content');?>
	
<div class="mdui-container-fluid">
	<div class="mdui-col-md-6 mdui-col-offset-md-3">
	  <center><h1 class="mdui-typo-display-2-opacity"><strong><font size=4 color=6f7073>Please enter the password to view.</font></strong></h1></center>
	  <form action="" method="post">
		  <div class="mdui-textfield mdui-textfield-floating-label">
		    <i class="mdui-icon material-icons">https</i>
		    <label class="mdui-textfield-label">Password</label>
		    <input name="password" class="mdui-textfield-input" type="password"/>
		  </div>
		  <br>
		  <button type="submit" class="mdui-center mdui-btn mdui-ripple mdui-color-theme-accent">
		  	<i class="mdui-icon material-icons">fingerprint</i>
		  	view
		  </button>
	  </form>
	</div>
	
</div>
<?php view::end('content');?>