Skip to content

Commit

Permalink
fix: 修复一些部署问题
Browse files Browse the repository at this point in the history
1、修改Nginx 配置,修复无法获取woff2|woff|ttf|eot格式文件的问题
2、xboard:install 默认数据库地址修改为 127.0.0.1 防止docker部署使用localhost无法连接到数据库的问题
3、修复v2_stat_user 表数据库迁移文件索引字段加错的问题
4、修复前端注册验证码没有跟随后端设置显示的问题
  • Loading branch information
gua committed Nov 15, 2023
1 parent 01210dd commit 310dc81
Show file tree
Hide file tree
Showing 5 changed files with 232 additions and 232 deletions.
2 changes: 1 addition & 1 deletion .docker/etc/nginx/http.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ server {
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

location ~* \.(jpg|jpeg|png|gif|js|css|svg)$ {
location ~* \.(jpg|jpeg|png|gif|js|css|svg|woff2|woff|ttf|eot)$ {
# 这里将.jpg、.jpeg、.png、.gif、.js和.css文件直接返回给客户端
}

Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/XboardInstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function handle()
$envConfig = [
'APP_KEY' => 'base64:' . base64_encode(Encrypter::generateKey('AES-256-CBC')),
'DB_CONNECTION' => 'mysql',
'DB_HOST' => $this->ask('请输入数据库地址(默认:localhost', 'localhost'),
'DB_HOST' => $this->ask('请输入数据库地址(默认:127.0.0.1', '127.0.0.1'),
'DB_DATABASE' => $this->ask('请输入数据库名', 'v2board'),
'DB_USERNAME' => $this->ask('请输入数据库用户名'),
'DB_PASSWORD' => $this->ask('请输入数据库密码'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function up()

// 如果是不是sqlite才添加多个索引
if(config('database.default') !== 'sqlite'){
$table->index(['user_id','sever_rate','record_at']);
$table->index(['user_id','server_rate','record_at']);
$table->unique(['server_rate', 'user_id', 'record_at'], 'server_rate_user_id_record_at');
}

Expand Down
Loading

0 comments on commit 310dc81

Please sign in to comment.