Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
php7.4-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eazy-template
php7.4-template
Commits
abc9af3e
You need to sign in or sign up before continuing.
Commit
abc9af3e
authored
Sep 17, 2025
by
xiezhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix makefile
parent
820aa919
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
Makefile
Makefile
+7
-1
README.md
README.md
+8
-0
No files found.
Makefile
View file @
abc9af3e
...
...
@@ -6,6 +6,10 @@ APP_PORT = $(or $(APP_PORT_1),8000)
RESOURCE_PATH
=
$
(
abspath
$
(
dir
$
(
lastword
$(MAKEFILE_LIST)
)))
/.resource/resource_dev.json
LOG_FILE
=
$
(
abspath
$
(
dir
$
(
lastword
$(MAKEFILE_LIST)
)))
/.logs/app.log
# 默认目标
.PHONY
:
all
all
:
install
# 安装命令
.PHONY
:
install
install
:
...
...
@@ -19,11 +23,13 @@ install:
# 运行命令
.PHONY
:
run
run
:
run
:
install
@
echo
"正在启动 PHP 应用..."
@
mkdir
-p
$
(
dir
$(LOG_FILE)
)
RESOURCE_PATH
=
$(RESOURCE_PATH)
APP_PORT_1
=
$(APP_PORT)
$(PHP)
-S
0.0.0.0:
$(APP_PORT)
-t
.
>
$(LOG_FILE)
2>&1 &
@
echo
"✅ PHP 应用已启动,运行在端口
$(APP_PORT)
"
@
echo
"访问地址: http://localhost:
$(APP_PORT)
"
@
echo
"查看日志: tail -f
$(LOG_FILE)
"
# 停止命令
.PHONY
:
stop
...
...
README.md
View file @
abc9af3e
...
...
@@ -52,6 +52,14 @@ make stop
|--------|--------|------|
|
`APP_PORT_1`
| 8000 | 应用监听端口 |
### Makefile 命令
本模板提供了三个核心 Makefile 命令:
-
`make install`
: 检查 PHP 和 Composer 版本,安装依赖
-
`make run`
: 启动 PHP 内置服务器(后台运行)
-
`make stop`
: 停止 PHP 应用
### Docker 部署
1.
**构建镜像**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment