微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

swoft docker环境

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


版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐