swoft docker环境
1.下载文件
swoft环境 链接: https://pan.baidu.com/s/1NlJYxhWv2Focgjgx2h0chg 提取码: 9zsd
swoft框架 链接: https://pan.baidu.com/s/13dcCpuJ4YB4_e8SRNHgRKg 提取码: gt6u
2.载入镜像
docker load swoft_alphp_fpm < swoft_alphp_fpm.tar
3.创建容器
docker run -itd -v swoft代码框架地址:/var/www/swoft -p 18306:18306 --name swoft_al_fpm swoft/alphp:fpm
4.进入容器
docker exec -it swoft_al_fpm sh
5.启动swoft
进入框架根目录 php bin/swoft http:start
6.浏览器访问
http://IP:18306/
7.其他服务启动
# 启动 HTTP 服务 $ php ./bin/swoft http:start # 以守护进程模式启动 $ php ./bin/swoft http:start -d # 重启 HTTP 服务 $ php ./bin/swoft http:restart # 重新加载 HTTP 服务 $ php ./bin/swoft http:reload # 停止 HTTP 服务 $ php ./bin/swoft http:stop # 启动 WS 服务 $ php ./bin/swoft ws:start # 以守护进程模式启动 $ php ./bin/swoft ws:start -d # 重启 WS 服务 $ php ./bin/swoft ws:restart # 重新加载 WS 服务 $ php ./bin/swoft ws:reload # 关闭 WS 服务 $ php ./bin/swoft ws:stop # 启动 RPC 服务 $ php ./bin/swoft rpc:start # 以守护进程模式启动 $ php ./bin/swoft rpc:start -d # 重启 RPC 服务 $ php ./bin/swoft rpc:restart # 重新加载 RPC 服务 $ php ./bin/swoft rpc:reload # 关闭 RPC 服务 $ php ./bin/swoft rpc:stop
本文由:xiaoshu168.com 作者:xiaoshu发表,转载请注明来源!