安装服务器 - 极简安装
获取安装代码
git clone git@github.com:WhiteRiverBay/beaver-payment-install.git
执行安装脚本
sh install_local.sh
根据脚本提示,完成配置
1 - Generating RSA Key Pair
..+++++++++++++++++++++++++++++++++++++++++++++*......................+.......+........+...+.+...+.....+.+..+...+.......+........+.......+..+.+.........+...+..+............+......+...+.......+...+..+....+........+.+..+...+....+.....+.+..+....+...+...........+......+.+.........+...+++++++++++++++++++++++++++++++++++++++++++++*.+..............+++++
.....+...+++++++++++++++++++++++++++++++++++++++++++++*.+.....+......+...+.+..+..................+++++++++++++++++++++++++++++++++++++++++++++*.+...+...................+...+.........+.....+...+.+.....+............+.........................+.....+...+....+...+........+......+...............+......+.......+............+......+.....+.............+..............+............+......+.......+..+....+.........+...............+.....+.+.........+...+..+.+...........+.........+......+.........+......+.............+..+.+.................+.......+.........+..+.......+++++
writing RSA key
Please keep the private.pem file safe and secure
public.pem saved in .config successful
Generating Google Authenticator Secret:
Google Authenticator Secret: AEMBWVASLZLV67TN
Generate Notify Secret:
Generating .env file
Please enter the redis password, if you don't know, just press enter
123456
Do you want to set telegram bot? (true/false):
false
Do you want to set default callback url now? (true/false):
false
Generating .env file successful
Please keep the .env file safe and secure
If you want to change the configuration, you can edit the .env file directly
Please run the server now
docker-compose -f docker-compose-local.yml up -d
Do you want to run the server now? (yes/no):
no
完成以上流程后,会生成本地独立部署的.env文件。如果在 "Do you want to run the server now?" 这个环节选择了yes,系统则会尝试立即启动。
请注意,执行安装后会在同目录下生成private.pem,这个是管理员归集资金的私钥。您可以将它保存在单独的u盘中,或者加密后保存到Google Drive中。
配置完成后启动服务
docker-compose -f docker-compose-local.yml up -d
查看日志
docker logs -f upayapi
访问接口
curl -vX GET http://localhost:8080
接口返回ok表示启动成功,示例如下:
curl -vX GET http://localhost:8080
Note: Unnecessary use of -X or --request, GET is already inferred.
* Host localhost:8080 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
* Trying [::1]:8080...
* Connected to localhost (::1) port 8080
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 200
< Vary: Origin
< Vary: Access-Control-Request-Method
< Vary: Access-Control-Request-Headers
< Content-Type: text/plain;charset=ISO-8859-1
< Content-Length: 2
< Date: Fri, 03 Jan 2025 22:33:06 GMT
<
* Connection #0 to host localhost left intact
ok
Last updated