使用原来的项目copy一个大国护眼
# 启动后端命令
docker run --name eye-protection --restart=always -p 9502:9501 -it -v d:/congyou/codefile/eye-protection:/eye-protection hyperf/hyperf:8.3-alpine-v3.19-swoole
执行一下
composer update
因为修改了server里面的端口为9502,所以启动的命令也要修改为9502
'servers' => [
[
'name' => 'http',
'type' => Server::SERVER_HTTP,
'host' => '0.0.0.0',
'port' => 9502,
'sock_type' => SWOOLE_SOCK_TCP,
'callbacks' => [
Event::ON_REQUEST => [Hyperf\HttpServer\Server::class, 'onRequest'],
],
'options' => [
// Whether to enable request lifecycle event
'enable_request_lifecycle' => false,
],
],
],
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
docker run --name eye-protection --restart=always -p 9502:9502 -it -v d:/congyou/codefile/eye-protection:/eye-protection hyperf/hyperf:8.3-alpine-v3.19-swoole
如果servers里面对应的是9502,那么容器里面的端口也要写9502才行,如果servers里面是9501,那么就要在端口映射的时候写9501
编辑 (opens new window)
上次更新: 2024/12/18, 17:45:13
- 01
- 免费的在线logo设计,uugai找了我好就12-24
- 02
- Untitled12-24