Go to file
2023-11-11 13:59:37 +08:00
app jsonrpc 2023-10-19 15:12:20 +08:00
build build.sh 2023-10-19 15:26:45 +08:00
config new shell scripts 2023-11-11 13:23:35 +08:00
jsonrpc jsonrpc 2023-10-19 15:12:20 +08:00
process init 2023-10-17 11:35:39 +08:00
public init 2023-10-17 11:35:39 +08:00
runtime init 2023-10-17 11:35:39 +08:00
support init 2023-10-17 11:35:39 +08:00
.env.example new shell scripts 2023-11-11 13:23:35 +08:00
.gitignore init 2023-10-17 11:35:39 +08:00
composer new shell scripts 2023-11-11 13:23:35 +08:00
composer.json jsonrpc 2023-10-19 15:12:20 +08:00
composer.lock docker.conf, env, webman/console, wandoubaba/res, log, exception 2023-10-18 17:04:31 +08:00
console start, console 2023-10-20 11:53:56 +08:00
docker-compose.yml shell bugs fixed 2023-11-11 13:48:58 +08:00
docker.conf docker.conf, env, webman/console, wandoubaba/res, log, exception 2023-10-18 17:04:31 +08:00
envexample new shell scripts 2023-11-11 13:23:35 +08:00
init shell bugs fixed 2023-11-11 13:48:58 +08:00
LICENSE init 2023-10-17 11:35:39 +08:00
php new shell scripts 2023-11-11 13:23:35 +08:00
php.ini init 2023-10-17 11:35:39 +08:00
README.md readme 2023-11-11 13:59:37 +08:00
server shell bugs fixed 2023-11-11 13:48:58 +08:00
start.php init 2023-10-17 11:35:39 +08:00
webman docker.conf, env, webman/console, wandoubaba/res, log, exception 2023-10-18 17:04:31 +08:00
windows.bat init 2023-10-17 11:35:39 +08:00
windows.php init 2023-10-17 11:35:39 +08:00

基于docker的webman-jsonrpc

我们在php:8.1-cli基础上安装了运行webman必要的一些扩展和开发中常用的扩展以及composer制作成workerman:8.1镜像因此在开发环境中不需要再额外配置php环境直接写业务代码即可。

依赖

只要系统环境中有docker即可不需要安装php环境

使用方法

# 初始化
./init
# composer
./composer install
./composer require xxxx
# 服务控制
./server start|restart|stop|status|reload|connections|logs
# 自动生成.env.example文件
./envexample
# 执行其它php命令
./php -m
./php webman build:bin

一些有用的文件

文件 作用 用法或说明
composer 调起容器中的composer命令的shell脚本 用法与主机中的compose完全一致./composer $args...
server 服务控制脚本 ./server可以查看用法
php 调起容器中的php命令的shell脚本 用法与主机中的php一致但注意执行./php start.php start命令时不要加-d参数
console 简化的php webman命令 执行./console build命令可以直接把项目打包成bin文件其它用法与webman/console命令行插件一致
docker-compose.yml 运行容器的编排文件
docker.conf 定义运行服务的容器名称和使用的镜像版本 注意container_name不要与系统中其他服务的容器重名
php.ini 映射到容器中的php.ini配置文件 容器中已经安装的扩展都有单独的配置文件,这里不会有体现

服务端口

在.env文件中可以定义服务端口默认情况下docker容器是在host网络下启动的当然实际使用中也可以改成端口映射模式。

已安装PHP扩展

php -m
[PHP Modules]
Core
ctype
curl
date
dom
event
exif
fileinfo
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
redis
Reflection
session
SimpleXML
sockets
sodium
SPL
sqlite3
standard
tokenizer
xlswriter
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache