代码拉取完成,页面将自动刷新
同步操作将从 aipaw/wookteam 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Fork the repo if you are outside collaborator https://github.com/kuaifan/wookteam.
// 使用ssh
git clone git@github.com:kuaifan/wookteam.git
// 或者你也可以使用https
git clone https://github.com/kuaifan/wookteam.git
// 进入目录
cd wookteam
// 拷贝 .env
cp .env.example .env
.env
数据库信息、WebSocket
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=wookteam
DB_USERNAME=root
DB_PASSWORD=123456
......
LARAVELS_LISTEN_IP=127.0.0.1
LARAVELS_LISTEN_PORT=5200
git checkout master # 如果使用dev分支进行本地开发
git pull origin master # 如果使用dev分支进行本地开发
composer install
php artisan key:generate
php artisan migrate --seed
npm install
npm run production
请确认您的环境以及安装Swoole。
php bin/laravels start
建议通过Supervisord监管主进程,前提是不能加
-d
选项并且设置swoole.daemonize
为false
。
[program:wookteam-test]
directory=/wwwroot/wookteam.com
command=/usr/local/bin/php bin/laravels start -i
numprocs=1
autostart=true
autorestart=true
startretries=3
user=www
redirect_stderr=true
stdout_logfile=/var/log/supervisor/%(program_name)s.log
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream swoole {
# Connect IP:Port
server 127.0.0.1:5200 weight=5 max_fails=3 fail_timeout=30s;
keepalive 16;
}
server {
listen 80;
# Don't forget to bind the host
server_name wookteam.com;
root /wwwroot/wookteam.com/public;
autoindex off;
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri @laravels;
}
location =/ws {
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-PORT $remote_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header Scheme $scheme;
proxy_set_header Server-Protocol $server_protocol;
proxy_set_header Server-Name $server_name;
proxy_set_header Server-Addr $server_addr;
proxy_set_header Server-Port $server_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
# "swoole" is the upstream
proxy_pass http://swoole;
}
location @laravels {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-PORT $remote_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header Scheme $scheme;
proxy_set_header Server-Protocol $server_protocol;
proxy_set_header Server-Name $server_name;
proxy_set_header Server-Addr $server_addr;
proxy_set_header Server-Port $server_port;
# "swoole" is the upstream
proxy_pass http://swoole;
}
}
注意:在升级之前请备份好你的数据!
git fetch --all
git reset --hard origin/master
git pull
composer update
php artisan migrate
npm install
npm run production
php bin/laravels start # 如果使用Supervisord则重启Supervisord
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。