Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tj_tool
Overview
Overview
Details
Activity
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
牟俊洁
tj_tool
Commits
5a39a0a3
Commit
5a39a0a3
authored
Nov 04, 2025
by
白满斌
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.eoffcn.com:mjj42250_1/tj_tool
parents
60294d82
0b5b026c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
3 deletions
+39
-3
build.sh
build.sh
+2
-0
crontab
crontab
+0
-3
init.sh
init.sh
+18
-0
log.sh
log.sh
+19
-0
No files found.
build.sh
View file @
5a39a0a3
...
@@ -6,6 +6,8 @@ then
...
@@ -6,6 +6,8 @@ then
docker run
-itd
--privileged
=
true
--restart
=
always
\
docker run
-itd
--privileged
=
true
--restart
=
always
\
--privileged
=
true
\
--privileged
=
true
\
-v
$(
pwd
)
:/data/www/project
\
-v
$(
pwd
)
:/data/www/project
\
-v
/data/www/tjapp_dist:/home/tjapp_dist
\
-v
/data/www/tjapp_admin_dist:/home/tjapp_admin_dist
\
-v
/data/cronlog_tjapp:/data/cronlog
\
-v
/data/cronlog_tjapp:/data/cronlog
\
-v
/data/container/nginx/tjapp:/usr/local/nginx/conf/vhost
\
-v
/data/container/nginx/tjapp:/usr/local/nginx/conf/vhost
\
-v
/data/container/nginx/nginx.conf:/usr/local/nginx/conf/nginx.conf
\
-v
/data/container/nginx/nginx.conf:/usr/local/nginx/conf/nginx.conf
\
...
...
crontab
View file @
5a39a0a3
...
@@ -6,8 +6,5 @@
...
@@ -6,8 +6,5 @@
# 任务调度注册
# 任务调度注册
* * * * * cd /data/www/project && php artisan schedule:run >> /dev/null 2>&1
* * * * * cd /data/www/project && php artisan schedule:run >> /dev/null 2>&1
# 消息队列进程
* * * * * * * /bin/bash /data/www/project/job.sh
# 每日凌晨更新日志文件链接
# 每日凌晨更新日志文件链接
3 0 0 * * * * /bin/bash /data/www/project/log.sh
3 0 0 * * * * /bin/bash /data/www/project/log.sh
init.sh
0 → 100644
View file @
5a39a0a3
#!/bin/bash
count
=
`
ps
-fe
|grep
"php-fpm"
|
grep
-v
"grep"
| wc
-l
`
if
[
$count
-eq
0
]
then
/usr/local/php/sbin/php-fpm
fi
count
=
`
ps
-fe
|grep
"nginx"
|
grep
-v
"grep"
| wc
-l
`
if
[
$count
-eq
0
]
then
/usr/local/nginx/sbin/nginx
-g
'daemon off;'
fi
log.sh
0 → 100755
View file @
5a39a0a3
#!/bin/bash
LOG_DIR
=
"/data/cronlog"
# 创建日志目录(如果不存在)
mkdir
-p
"
$LOG_DIR
"
# crontab的日志文件
CRONTAB_LOG_FILE
=
"
$LOG_DIR
/crontab.log"
NEW_CRONTAB_LOG_FILE
=
"
$LOG_DIR
/crontab_
$(
date
-d
"1 days ago"
+%Y-%m-%d
)
.log"
# job的日志文件
JOB_LOG_FILE
=
"
$LOG_DIR
/job.log"
NEW_JOB_LOG_FILE
=
"
$LOG_DIR
/job_
$(
date
-d
"1 days ago"
+%Y-%m-%d
)
.log"
# 将当前日志文件重命名为昨天的日志文件 && 清空日志文件
cp
"
$CRONTAB_LOG_FILE
"
"
$NEW_CRONTAB_LOG_FILE
"
&&
cat
/dev/null
>
"
$CRONTAB_LOG_FILE
"
# 将当前日志文件重命名为昨天的日志文件 && 清空日志文件
cp
"
$JOB_LOG_FILE
"
"
$NEW_JOB_LOG_FILE
"
&&
cat
/dev/null
>
"
$JOB_LOG_FILE
"
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