Compare commits
13 Commits
e2e869327a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 90afcb140b | |||
| c59be26ea3 | |||
| a1788210dc | |||
| dbb9e8b6d6 | |||
| 26c8a54a55 | |||
| a535ec79b6 | |||
| 9aebd17f1c | |||
| 53463867db | |||
| feed4da272 | |||
| ca4a943678 | |||
| 2068f57c69 | |||
| fb52f6d5db | |||
| c30ca28cd0 |
14
.dockerignore
Normal file
@ -0,0 +1,14 @@
|
||||
.git
|
||||
.gitignore
|
||||
.env
|
||||
.DS_Store
|
||||
*.md
|
||||
docker-compose.yml
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
node_modules
|
||||
.vscode
|
||||
.idea
|
||||
*.log
|
||||
runtime/*
|
||||
*.user.ini
|
||||
@ -0,0 +1,7 @@
|
||||
[DATABASE]
|
||||
HOSTNAME=localhost
|
||||
DATABASE=mydatabase
|
||||
USERNAME=myuser
|
||||
PASSWORD=mypassword
|
||||
CHARSET=utf8mb4
|
||||
PORT=3306
|
||||
2
404.html
Normal file → Executable file
2
502.html
Normal file → Executable file
174
DOCKER_README.md
Normal file
@ -0,0 +1,174 @@
|
||||
# Docker 部署说明
|
||||
|
||||
本项目使用 `webdevops/php-nginx:7.2-alpine` 作为基础镜像。
|
||||
|
||||
## 文件说明
|
||||
|
||||
- `Dockerfile` - Docker 镜像构建文件
|
||||
- `docker-compose.yml` - Docker Compose 编排文件
|
||||
- `.dockerignore` - Docker 构建忽略文件
|
||||
- `docker/nginx/vhost.conf` - Nginx 虚拟主机配置
|
||||
|
||||
## 快速启动
|
||||
|
||||
### 1. 安装依赖(首次部署)
|
||||
|
||||
在启动 Docker 之前,需要先在宿主机上安装 Composer 依赖:
|
||||
|
||||
```bash
|
||||
composer install
|
||||
```
|
||||
|
||||
### 2. 启动服务
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
### 3. 查看服务状态
|
||||
|
||||
```bash
|
||||
docker-compose ps
|
||||
```
|
||||
|
||||
### 4. 查看日志
|
||||
|
||||
```bash
|
||||
# 查看所有服务日志
|
||||
docker-compose logs -f
|
||||
|
||||
# 查看 web 服务日志
|
||||
docker-compose logs -f web
|
||||
|
||||
# 查看 MySQL 日志
|
||||
docker-compose logs -f mysql
|
||||
```
|
||||
|
||||
## 服务信息
|
||||
|
||||
### Web 服务
|
||||
- 访问地址: http://localhost:8080
|
||||
- 容器名称: weipan_web
|
||||
- PHP 版本: 7.2
|
||||
- Web 服务器: Nginx
|
||||
|
||||
### MySQL 服务
|
||||
- 主机: mysql (容器内) / localhost:3306 (宿主机)
|
||||
- 数据库: weipan
|
||||
- 用户名: weipan
|
||||
- 密码: weipan123
|
||||
- Root 密码: root
|
||||
|
||||
## 配置说明
|
||||
|
||||
### PHP 配置
|
||||
- 内存限制: 256M
|
||||
- 执行时间: 300秒
|
||||
- POST 大小: 50M
|
||||
- 上传文件大小: 50M
|
||||
|
||||
### 数据库配置
|
||||
|
||||
修改 `config/database.php` 中的数据库连接信息:
|
||||
|
||||
```php
|
||||
'hostname' => 'mysql', // Docker 容器内使用服务名
|
||||
'database' => 'weipan',
|
||||
'username' => 'weipan',
|
||||
'password' => 'weipan123',
|
||||
```
|
||||
|
||||
## 常用命令
|
||||
|
||||
### 停止服务
|
||||
|
||||
```bash
|
||||
docker-compose stop
|
||||
```
|
||||
|
||||
### 重启服务
|
||||
|
||||
```bash
|
||||
docker-compose restart
|
||||
```
|
||||
|
||||
### 停止并删除容器
|
||||
|
||||
```bash
|
||||
docker-compose down
|
||||
```
|
||||
|
||||
### 停止并删除容器和数据卷
|
||||
|
||||
```bash
|
||||
docker-compose down -v
|
||||
```
|
||||
|
||||
### 重新构建镜像
|
||||
|
||||
```bash
|
||||
docker-compose build --no-cache
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
### 进入容器
|
||||
|
||||
```bash
|
||||
# 进入 web 容器
|
||||
docker-compose exec web sh
|
||||
|
||||
# 进入 MySQL 容器
|
||||
docker-compose exec mysql bash
|
||||
```
|
||||
|
||||
### 清理缓存
|
||||
|
||||
```bash
|
||||
docker-compose exec web php think clear
|
||||
```
|
||||
|
||||
## 目录权限
|
||||
|
||||
如果遇到权限问题,可以在容器内执行:
|
||||
|
||||
```bash
|
||||
docker-compose exec web chown -R application:application /app
|
||||
docker-compose exec web chmod -R 777 /app/runtime
|
||||
```
|
||||
|
||||
## 生产环境建议
|
||||
|
||||
1. 修改 MySQL 密码为强密码
|
||||
2. 调整 `docker-compose.yml` 中的端口映射
|
||||
3. 设置合适的环境变量
|
||||
4. 配置数据卷备份策略
|
||||
5. 启用 HTTPS
|
||||
6. 配置防火墙规则
|
||||
|
||||
## 故障排查
|
||||
|
||||
### 查看容器日志
|
||||
|
||||
```bash
|
||||
docker-compose logs -f web
|
||||
```
|
||||
|
||||
### 检查容器状态
|
||||
|
||||
```bash
|
||||
docker-compose ps
|
||||
```
|
||||
|
||||
### 测试数据库连接
|
||||
|
||||
```bash
|
||||
docker-compose exec mysql mysql -uweipan -pweipan123 weipan
|
||||
```
|
||||
|
||||
### 重置权限
|
||||
|
||||
```bash
|
||||
docker-compose exec web chown -R application:application /app
|
||||
docker-compose exec web chmod -R 755 /app
|
||||
docker-compose exec web chmod -R 777 /app/runtime
|
||||
```
|
||||
39
Dockerfile
Normal file
@ -0,0 +1,39 @@
|
||||
FROM webdevops/php-nginx:7.2-alpine
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
# 复制项目文件
|
||||
COPY . /app
|
||||
# 复制 Nginx 配置文件
|
||||
COPY docker/nginx/enable-php.conf /opt/docker/etc/nginx/enable-php.conf
|
||||
COPY docker/nginx/vhost.conf /opt/docker/etc/nginx/vhost.conf
|
||||
# 复制自定义 entrypoint 脚本
|
||||
COPY docker/entrypoint.sh /usr/local/bin/custom-entrypoint.sh
|
||||
# 安装时区数据并给脚本添加可执行权限
|
||||
RUN apk add --no-cache tzdata && \
|
||||
chmod +x /app/public/start.sh && \
|
||||
chmod +x /usr/local/bin/custom-entrypoint.sh
|
||||
# 设置权限:app 目录可写,内部文件只读,runtime 目录可写
|
||||
RUN chmod 755 /app && \
|
||||
chmod -R 555 /app/* && \
|
||||
chmod -R 755 /app/runtime && \
|
||||
chmod -R 755 /app/upload
|
||||
# 复制 crontab 配置并安装
|
||||
COPY docker/crontab /tmp/crontab
|
||||
RUN cat /tmp/crontab && \
|
||||
crontab -u application /tmp/crontab && \
|
||||
crontab -u application -l && \
|
||||
rm /tmp/crontab
|
||||
# 设置环境变量
|
||||
ENV SERVER_DATE_TIMEZONE=Asia/Shanghai
|
||||
|
||||
ENV WEB_DOCUMENT_ROOT=/app/public \
|
||||
PHP_DISPLAY_ERRORS=0 \
|
||||
PHP_MEMORY_LIMIT=512M \
|
||||
PHP_MAX_EXECUTION_TIME=300 \
|
||||
PHP_POST_MAX_SIZE=50M \
|
||||
PHP_UPLOAD_MAX_FILESIZE=50M \
|
||||
PHP_DATE_TIMEZONE=${SERVER_DATE_TIMEZONE}
|
||||
# 声明容器对外暴露的端口
|
||||
EXPOSE 80
|
||||
# 设置自定义 entrypoint
|
||||
ENTRYPOINT ["/usr/local/bin/custom-entrypoint.sh"]
|
||||
@ -50,6 +50,7 @@
|
||||
<th class='text-left nowrap'>当前收益(元)</th>
|
||||
<th class='text-left nowrap'>预期收益(元)</th>
|
||||
<th class='text-left nowrap'>开始时间</th>
|
||||
<!-- <th class='text-left nowrap'>结算时间</th>-->
|
||||
<th class='text-left nowrap'>结束时间</th>
|
||||
<th class='text-left nowrap'>状态</th>
|
||||
<th class='text-left nowrap'></th>
|
||||
@ -89,6 +90,9 @@
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.start_time}
|
||||
</td>
|
||||
<!-- <td class='text-left nowrap'>-->
|
||||
<!-- {:date('Y-m-d H:i:s',$vo.profit_time)}-->
|
||||
<!-- </td>-->
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.end_time}
|
||||
</td>
|
||||
|
||||
115
application/command/Yebeveryday.php
Normal file
@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
namespace app\command;
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
use think\Db;
|
||||
|
||||
class InterestTreasure extends Command
|
||||
{
|
||||
protected $outputInfo;
|
||||
protected function configure()
|
||||
{
|
||||
// 指令配置
|
||||
$this->setName('InterestTreasure');
|
||||
// 设置参数
|
||||
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
// 指令执行
|
||||
$this->outputInfo = $output;
|
||||
$this->closeAccount();
|
||||
|
||||
}
|
||||
|
||||
public function closeAccount()
|
||||
{
|
||||
$this->outputInfo->writeln('开始结算');
|
||||
try {
|
||||
//逻辑代码
|
||||
$this->yebeveryday();
|
||||
} catch (\Exception $exception) {
|
||||
//Log::info($exception->getMessage());
|
||||
var_dump($exception->getTrace());
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
public function yebeveryday()
|
||||
{
|
||||
$nowtime = time();
|
||||
$keepnum = 0;
|
||||
$closenum = 0;
|
||||
$getdoings = Db::table('lc_yuebao_lists')->where('status=1 and profit_time<=' . (time() - 86400))->select();
|
||||
foreach ($getdoings as $getdoing) {
|
||||
try {
|
||||
$new_profit_time = $nowtime;
|
||||
if ($new_profit_time >= $getdoing['end_time']) {
|
||||
$new_profit_time = $getdoing['end_time'];
|
||||
}
|
||||
$seconds = floor(($new_profit_time - $getdoing['profit_time']) / 86400);
|
||||
$nowprift = ($getdoing['money'] * $getdoing['lily'] / 100) * $seconds;
|
||||
$profit = $getdoing['profit'] + $seconds;
|
||||
$id = $getdoing['id'];
|
||||
var_dump($seconds);
|
||||
var_dump($getdoing['profit_time'] + $seconds * 86400);
|
||||
if ($nowprift > 0) {
|
||||
Db::table('lc_yuebao_lists')->where('id='. $getdoing['id'])
|
||||
->update([
|
||||
'profit_time' => $getdoing['profit_time'] + $seconds * 86400,
|
||||
'nowprofit' => $getdoing['nowprofit'] + $nowprift,
|
||||
'profit' => $getdoing['profit'] + $seconds
|
||||
]);
|
||||
$keepnum = $keepnum + 1;
|
||||
//获取用户余额;
|
||||
addFinance($getdoing['uid'], $nowprift, 1, "余额宝利息返利");
|
||||
$getuserinfo = Db::table('lc_user')->where('id=' . $getdoing['uid'])->find();
|
||||
//记录日志!
|
||||
unset($getdoing['id']);
|
||||
unset($getdoing['profit_time']);
|
||||
unset($getdoing['profit']);
|
||||
$getdoing['status'] = 2;
|
||||
$getdoing['nowprofit'] = $nowprift;
|
||||
$getdoing['balance'] = $getuserinfo['money'];
|
||||
$getdoing['closetime'] = time();
|
||||
$getdoing['remarks'] = "自动结算";
|
||||
Db::table('lc_yuebao_log')->insert($getdoing);
|
||||
//更新用户余额
|
||||
$newbalance = $getuserinfo['money'] + $nowprift;
|
||||
Db::table('lc_user')->where('id=' . $getdoing['uid'])->update(['money' => $newbalance]);
|
||||
}
|
||||
//第二步,已到期待结算
|
||||
if ($profit >= $getdoing['days']) {
|
||||
//更新参保状态。
|
||||
Db::table('lc_yuebao_lists')->where('id=' . $id)
|
||||
->update(['status' => 2]);
|
||||
//获取用户余额;
|
||||
addFinance($getdoing['uid'], $getdoing['money'], 1, "余额宝返还本金");
|
||||
$getuserinfo = Db::table('lc_user')->where('id=' . $getdoing['uid'])->find();
|
||||
//更新用户余额
|
||||
$newbalance = $getuserinfo['money'] + $getdoing['money'];
|
||||
Db::table('lc_user')->where('id=' . $getdoing['uid'])->update(['money' => $newbalance]);
|
||||
$getuc = Db::table('lc_yuebao_uc')->where('uid=' . $getdoing['uid'])->find();
|
||||
Db::table('lc_yuebao_uc')->where('uid=' . $getdoing['uid'])->update(['balance' => $getuc['balance'] - $getdoing['money']]);
|
||||
$saveuclog = array(
|
||||
'uid' => $getdoing['uid'],
|
||||
'balance' => $getuc['balance'],
|
||||
'money' => "-" . $getdoing['money'],
|
||||
'addtime' => time(),
|
||||
'remarks' => $getdoing['yebtitle'] . "到期结算"
|
||||
);
|
||||
Db::table('lc_yuebao_uclog')->insert($saveuclog);
|
||||
$closenum = $closenum + 1;
|
||||
}
|
||||
}catch (\Exception $e){
|
||||
var_dump($e->getTraceAsString());
|
||||
$this->outputInfo->error("结算失败,ID: " . $getdoing['id'] . " 错误信息: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
$this->outputInfo->writeln('结算成功:' . $keepnum . '条,到期:' . $closenum . '条');
|
||||
}
|
||||
}
|
||||
40
composer.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"type": "project",
|
||||
"name": "zoujingli/thinkadmin",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Anyon",
|
||||
"email": "zoujingli@qq.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "~7.2",
|
||||
"aliyuncs/oss-sdk-php": "^2.3",
|
||||
"endroid/qr-code": "^1.9",
|
||||
"qiniu/php-sdk": "^7.2",
|
||||
"symfony/options-resolver": "^3.4",
|
||||
"topthink/framework": "^5.1",
|
||||
"zoujingli/ip2region": "^1.0",
|
||||
"zoujingli/think-library": "5.1.x-dev",
|
||||
"zoujingli/wechat-developer": "^1.2",
|
||||
"zoujingli/weopen-developer": "dev-master"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.0|^5.0",
|
||||
"squizlabs/php_codesniffer": "~2.3",
|
||||
"phploc/phploc": "2.*",
|
||||
"sebastian/phpcpd": "2.*"
|
||||
},
|
||||
"repositories": {
|
||||
"packagist": {
|
||||
"type": "composer",
|
||||
"url": "https://mirrors.aliyun.com/composer"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"topthink/think-installer": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -27,5 +27,5 @@ return [
|
||||
'DEFAULT_TIMEZONE' => 'America/Sao_Paulo',
|
||||
'default_lang' => 'zh-cn', // 设置默认语言
|
||||
'lang_switch_on' => true, // 开启多语言切换
|
||||
'deny_module_list' => ['akszadmin']
|
||||
'deny_module_list' => ['akszadmin','command','lang']
|
||||
];
|
||||
|
||||
20
config/console.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 控制台配置
|
||||
// +----------------------------------------------------------------------
|
||||
return [
|
||||
'name' => 'Think Console',
|
||||
'version' => '0.1',
|
||||
'user' => null,
|
||||
'auto_path' => env('app_path') . 'command' . DIRECTORY_SEPARATOR,
|
||||
];
|
||||
@ -13,7 +13,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
return [
|
||||
// 数据库调试模式
|
||||
'debug' => env('database.debug', true),
|
||||
'debug' => false,
|
||||
// 数据库类型
|
||||
'type' => 'mysql',
|
||||
// 服务器地址
|
||||
|
||||
1
db/.gitignore
vendored
Executable file
@ -0,0 +1 @@
|
||||
*.sql
|
||||
BIN
db/0302-2_2025-08-15_01-49-45_mysql_data_Dl1OJ.sql.zip
Normal file
31
docker-compose.yml
Normal file
@ -0,0 +1,31 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
weipan02:
|
||||
container_name: weipan02
|
||||
image: gits.boolcdn.net/weipan_server:25.10.31
|
||||
environment:
|
||||
- SERVER_DATE_TIMEZONE=Asia/Shanghai
|
||||
# 数据库配置(用于生成 .env 文件)
|
||||
- database_hostname=10.0.0.1
|
||||
- database_database=0302-2
|
||||
- database_username=0302-2
|
||||
- database_password=0302-2
|
||||
- database_charset=utf8mb4
|
||||
- database_hostport=3306
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- /www/docker/weipan02/_runtime:/app/runtime
|
||||
- /www/docker/weipan02/_upload:/app/public/upload
|
||||
networks:
|
||||
- docker
|
||||
restart: always
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.25"
|
||||
memory: 8gb
|
||||
networks:
|
||||
docker:
|
||||
external: true
|
||||
5
docker/crontab
Normal file
@ -0,0 +1,5 @@
|
||||
# 每分钟执行 start.sh
|
||||
* * * * * /bin/sh /app/public/start.sh >> /app/runtime/log/start_log.log 2>&1
|
||||
|
||||
# 每分钟执行 think InterestTreasure
|
||||
* * * * * cd /app && /usr/local/bin/php /app/think InterestTreasure >> /app/runtime/log/InterestTreasure_log.log 2>&1
|
||||
28
docker/entrypoint.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cp /usr/share/zoneinfo/${SERVER_DATE_TIMEZONE:-Asia/Shanghai} /etc/localtime
|
||||
|
||||
echo "${SERVER_DATE_TIMEZONE:-Asia/Shanghai}" > /etc/timezone
|
||||
|
||||
# 动态设置 PHP_DATE_TIMEZONE 与 SERVER_DATE_TIMEZONE 保持一致(运行时生效)
|
||||
export PHP_DATE_TIMEZONE=${SERVER_DATE_TIMEZONE:-Asia/Shanghai}
|
||||
|
||||
date
|
||||
|
||||
# 根据环境变量生成 .env 文件
|
||||
cat > /app/.env <<EOF
|
||||
[DATABASE]
|
||||
HOSTNAME=${database_hostname:-10.100.100.88}
|
||||
DATABASE=${database_database:-mydatabase}
|
||||
USERNAME=${database_username:-myuser}
|
||||
PASSWORD=${database_password:-mypassword}
|
||||
CHARSET=${database_charset:-utf8mb4}
|
||||
HOSTPORT=${database_hostport:-3306}
|
||||
EOF
|
||||
|
||||
echo "Generated .env file:"
|
||||
cat /app/.env
|
||||
|
||||
# 执行原始镜像的入口点(webdevops 镜像使用 supervisord)
|
||||
exec /entrypoint supervisord
|
||||
41
docker/nginx/enable-php.conf
Normal file
@ -0,0 +1,41 @@
|
||||
location ~ [^/]\.php(/|$)
|
||||
{
|
||||
try_files $uri =404;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param QUERY_STRING $query_string;
|
||||
fastcgi_param REQUEST_METHOD $request_method;
|
||||
fastcgi_param CONTENT_TYPE $content_type;
|
||||
fastcgi_param CONTENT_LENGTH $content_length;
|
||||
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_param REQUEST_URI $request_uri;
|
||||
fastcgi_param DOCUMENT_URI $document_uri;
|
||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
||||
fastcgi_param REQUEST_SCHEME $scheme;
|
||||
fastcgi_param HTTPS $https if_not_empty;
|
||||
|
||||
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
||||
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||
|
||||
fastcgi_param REMOTE_ADDR $remote_addr;
|
||||
fastcgi_param REMOTE_PORT $remote_port;
|
||||
fastcgi_param SERVER_ADDR $server_addr;
|
||||
fastcgi_param SERVER_PORT $server_port;
|
||||
fastcgi_param SERVER_NAME $server_name;
|
||||
|
||||
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
|
||||
set $real_script_name $fastcgi_script_name;
|
||||
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
|
||||
set $real_script_name $1;
|
||||
set $path_info $2;
|
||||
}
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
|
||||
fastcgi_param SCRIPT_NAME $real_script_name;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
}
|
||||
52
docker/nginx/vhost.conf
Normal file
@ -0,0 +1,52 @@
|
||||
server
|
||||
{
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /app/public;
|
||||
index index.php index.html;
|
||||
|
||||
#必须放在解析PHP之前
|
||||
#禁止目录执行php SATRT
|
||||
location ~* ^/(h5|guoqi|static|upload)/.*\.(php|php5|php7|php8)$ {
|
||||
default_type application/json;
|
||||
return 200 '{"message":"You are definitely a particularly bad big fool."}';
|
||||
}
|
||||
#禁止目录执行php END
|
||||
|
||||
include /opt/docker/etc/nginx/enable-php.conf;
|
||||
|
||||
location / {
|
||||
if (!-e $request_filename){
|
||||
rewrite ^(.*)$ /index.php?s=$1 last; break;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ ^/(\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md)
|
||||
{
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ \.well-known{
|
||||
allow all;
|
||||
}
|
||||
if ( $uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) {
|
||||
return 403;
|
||||
}
|
||||
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
|
||||
{
|
||||
expires 30d;
|
||||
error_log /dev/null;
|
||||
access_log /dev/null;
|
||||
}
|
||||
|
||||
location ~ .*\.(js|css)?$
|
||||
{
|
||||
expires 12h;
|
||||
error_log /dev/null;
|
||||
access_log /dev/null;
|
||||
}
|
||||
# 访问日志
|
||||
access_log /docker.stdout;
|
||||
error_log /docker.stderr;
|
||||
}
|
||||
0
index.html
Normal file → Executable file
1
public/.dockerignore
Normal file
@ -0,0 +1 @@
|
||||
.user.ini
|
||||
3
public/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
.well-known
|
||||
.user.ini
|
||||
.user.ini
|
||||
h5
|
||||
123
public/chatlink.html
Executable file
@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible " content="IE=edge" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>在线咨询</title>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
function parse(query) {
|
||||
var qs = {};
|
||||
var i = query.indexOf('?');
|
||||
if (i < 0 && query.indexOf('=') < 0) {
|
||||
return qs;
|
||||
} else if (i >= 0) {
|
||||
query = query.substring(i + 1);
|
||||
}
|
||||
var parts = query.split('&');
|
||||
for (var n = 0; n < parts.length; n++) {
|
||||
var part = parts[n];
|
||||
var key = part.split('=')[0];
|
||||
var val = part.split('=')[1];
|
||||
key = key.toLowerCase();
|
||||
if (typeof qs[key] === 'undefined') {
|
||||
qs[key] = decodeURIComponent(val);
|
||||
} else if (typeof qs[key] === 'string') {
|
||||
var arr = [qs[key], decodeURIComponent(val)];
|
||||
qs[key] = arr;
|
||||
} else {
|
||||
qs[key].push(decodeURIComponent(val));
|
||||
}
|
||||
}
|
||||
return qs;
|
||||
}
|
||||
function init() {
|
||||
(function (m, ei, q, i, a, j, s) {
|
||||
m[i] =
|
||||
m[i] ||
|
||||
function () {
|
||||
(m[i].a = m[i].a || []).push(arguments);
|
||||
};
|
||||
(j = ei.createElement(q)), (s = ei.getElementsByTagName(q)[0]);
|
||||
j.async = true;
|
||||
j.charset = 'UTF-8';
|
||||
j.src = 'https://static.meiqia.com/widget/loader.js';
|
||||
s.parentNode.insertBefore(j, s);
|
||||
})(window, document, 'script', '_MEIQIA');
|
||||
var data = parse(window.location.search);
|
||||
var entId = data.entid || data.eid;
|
||||
if (Object.prototype.toString.call(entId) === '[object Array]') {
|
||||
entId = +entId[0];
|
||||
} else {
|
||||
entId = +entId;
|
||||
}
|
||||
_MEIQIA('entId', 'a968261aa97f7f10847326aebecb08bf' || entId);
|
||||
_MEIQIA('standalone', function (config) {
|
||||
if (config.color) {
|
||||
document.body.style['background-color'] = '#' + config.color;
|
||||
}
|
||||
if (config.url) {
|
||||
document.body.style['background-image'] = 'url(' + config.url + ')';
|
||||
document.body.style['background-repeat'] = 'no-repeat';
|
||||
document.body.style['background-size'] = '100% 100%';
|
||||
}
|
||||
});
|
||||
_MEIQIA('withoutBtn');
|
||||
if (data.metadata) {
|
||||
try {
|
||||
var metadata = JSON.parse(data.metadata);
|
||||
_MEIQIA('metadata', metadata);
|
||||
} catch (e) { }
|
||||
}
|
||||
if (data.encryptedmetadata) {
|
||||
_MEIQIA('encryptedmetadata', data.encryptedmetadata);
|
||||
}
|
||||
if (data.requestperms) {
|
||||
localStorage.setItem('requestperms', data.requestperms);
|
||||
}
|
||||
if (data.language) {
|
||||
if (data.languagelocal !== 'true') {
|
||||
_MEIQIA('language', data.language);
|
||||
}
|
||||
}
|
||||
if (data.languagelocal === 'true') {
|
||||
_MEIQIA('languageLocal', true);
|
||||
}
|
||||
if (data.subsource) {
|
||||
_MEIQIA('subSource', data.subsource);
|
||||
}
|
||||
if (data.fallback) {
|
||||
_MEIQIA('fallback', +data.fallback);
|
||||
}
|
||||
if (data.socketprotocol) {
|
||||
_MEIQIA('socketProtocol', data.socketprotocol);
|
||||
}
|
||||
_MEIQIA('handleParams', data);
|
||||
if (data.clientid) {
|
||||
_MEIQIA('clientId', data.clientid);
|
||||
}
|
||||
if (data.agentid || data.groupid) {
|
||||
_MEIQIA('assign', { agentToken: data.agentid || null, groupToken: data.groupid || null });
|
||||
}
|
||||
_MEIQIA('showPanel', {
|
||||
greeting: data.greeting || '',
|
||||
agentToken: data.agentid || null,
|
||||
groupToken: data.groupid || null
|
||||
});
|
||||
}
|
||||
init();
|
||||
</script>
|
||||
</body >
|
||||
</html >
|
||||
BIN
public/guoqi/1.png
Executable file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
public/guoqi/10.png
Executable file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/guoqi/11.png
Executable file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/guoqi/12.png
Executable file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/guoqi/13.png
Executable file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
public/guoqi/14.png
Executable file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
public/guoqi/1bnb.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/guoqi/2.png
Executable file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/guoqi/2eth.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/guoqi/3.png
Executable file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
public/guoqi/4.png
Executable file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/guoqi/5.png
Executable file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
public/guoqi/6.png
Executable file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
public/guoqi/7.png
Executable file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/guoqi/8.png
Executable file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
public/guoqi/9.png
Executable file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
public/guoqi/BNB.png
Executable file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
public/guoqi/ERH.png
Executable file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
public/guoqi/Gold.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/guoqi/HBGTRX.png
Executable file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
public/guoqi/ada.png
Executable file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
public/guoqi/bch.png
Executable file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
public/guoqi/btc.png
Executable file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
public/guoqi/dash.png
Executable file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
public/guoqi/doge.png
Executable file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
public/guoqi/eos.png
Executable file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
public/guoqi/eth.png
Executable file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
public/guoqi/iota.png
Executable file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
public/guoqi/ltc.png
Executable file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
public/guoqi/usdt.png
Executable file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
public/guoqi/xrp.png
Executable file
|
After Width: | Height: | Size: 8.8 KiB |
@ -1,8 +1,9 @@
|
||||
#!/bin/sh
|
||||
# 设置执行的持续时间(60秒 = 1分钟)
|
||||
cd /www/wwwroot/weipan02_server/public
|
||||
for i in {1..29}
|
||||
cd /app/public
|
||||
for i in $(seq 1 29)
|
||||
do
|
||||
php index.php /index/index/order
|
||||
php index.php /index/index/product
|
||||
sleep 1
|
||||
done
|
||||
done
|
||||
|
||||