Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docker-test
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
Kunkka王辉
docker-test
Commits
2ff73c50
Commit
2ff73c50
authored
Sep 14, 2023
by
Kunkka王辉
😲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
脚本优化
parent
3a1e40c4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
99 deletions
+28
-99
docker-compose.yaml
docker-compose.yaml
+15
-5
Dockerfile-java
src/Dockerfile-java
+5
-2
Dockerfile-nginx
src/Dockerfile-nginx
+5
-30
Dockerfile-php
src/Dockerfile-php
+2
-4
check.sh
src/check.sh
+0
-55
nginx-start.sh
src/nginx-start.sh
+1
-3
No files found.
docker-compose.yaml
View file @
2ff73c50
...
...
@@ -67,7 +67,9 @@ services:
dockerfile
:
Dockerfile-java
image
:
galaxy-java:11
container_name
:
java-notice-${ENV:-dev}
command
:
[
'
/app/java-start.sh'
,
'
notice'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
environment
:
-
PROJECT_NAME=notice
command
:
[
'
java'
,
'
-jar'
,
'
app.jar'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
volumes
:
-
${CODE_DIR}:/app/code
-
maven-repo:/usr/share/maven/repo
# maven共享repo目录
...
...
@@ -85,7 +87,9 @@ services:
volumes
:
-
${CODE_DIR}:/app/code
-
maven-repo:/usr/share/maven/repo
# maven共享repo目录
command
:
[
'
/app/java-start.sh'
,
'
biz-platform'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
environment
:
-
PROJECT_NAME=biz-platform
command
:
[
'
java'
,
'
-jar'
,
'
app.jar'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
expose
:
-
80
networks
:
...
...
@@ -100,7 +104,9 @@ services:
volumes
:
-
${CODE_DIR}:/app/code
-
maven-repo:/usr/share/maven/repo
# maven共享repo目录
command
:
[
'
/app/java-start.sh'
,
'
flowengine'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
environment
:
-
PROJECT_NAME=flowengine
command
:
[
'
java'
,
'
-jar'
,
'
app.jar'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
expose
:
-
80
networks
:
...
...
@@ -115,7 +121,9 @@ services:
volumes
:
-
${CODE_DIR}:/app/code
-
maven-repo:/usr/share/maven/repo
# maven共享repo目录
command
:
[
'
/app/java-start.sh'
,
'
intelligentwriting'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
environment
:
-
PROJECT_NAME=intelligentwriting
command
:
[
'
java'
,
'
-jar'
,
'
app.jar'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
expose
:
-
80
networks
:
...
...
@@ -130,7 +138,9 @@ services:
volumes
:
-
${CODE_DIR}:/app/code
-
maven-repo:/usr/share/maven/repo
# maven共享repo目录
command
:
[
'
/app/java-start.sh'
,
'
client'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
environment
:
-
PROJECT_NAME=client
command
:
[
'
java'
,
'
-jar'
,
'
app.jar'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
expose
:
-
80
networks
:
...
...
src/Dockerfile-java
View file @
2ff73c50
FROM maven:3.8.4-openjdk-11
ENV TZ=Asia/Shanghai
WORKDIR /app
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY settings.xml /usr/share/maven/conf/settings.xml
COPY <<EOF /app/java-start.sh
#/bin/bash
...
...
@@ -9,13 +11,14 @@ if [ -n "\$1" ]; then
PROJECT_NAME="\$1"
shift
fi
cd /app/code/
\
$PROJECT_NAME
cd /app/code/$PROJECT_NAME
mvn clean package -B -DskipTests
mv /app/code/\$PROJECT_NAME/target/*.jar /app/app.jar
mvn clean
exec java -jar /app/app.jar "\$@"
EOF
RUN chmod +x /app/java-start.sh
CMD ["/app/java-start.sh"]
ENTRYPOINT ["/app/java-start.sh"]
CMD ["java","-jar","app.jar"]
src/Dockerfile-nginx
View file @
2ff73c50
FROM nginx:latest
## 初始化参数
ARG HOST
ARG PHP_HOST
ARG DWP_HTTP_PORT
ARG OLD_CRM_HTTP_PORT
ARG OLD_CRM_CLIENT_HTTP_PORT
ARG OLD_CRM_USER_HTTP_PORT
ARG OLD_CRM_ADMIN_HTTP_PORT
ARG GALAXY_CRM_API_HTTP_PORT
ARG GALAXY_FLOW_MICROS_API_HTTP_PORT
ARG GALAXY_SERVER_SITE_API_HTTP_PORT
ARG GALAXY_USER_MICROS_API_HTTP_PORT
ARG GALAXY_PRESALE_MICROS_API_HTTP_PORT
ARG GALAXY_MICROS_GATEWAY_API_HTTP_PORT
ARG GALAXY_ENTRY_API_HTTP_PORT
ARG GALAXY_WORKFLOW_API_HTTP_PORT
ARG GALAXY_COMMON_SERVER_API_HTTP_PORT
ARG GALAXY_MEMBER_API_HTTP_PORT
ARG NOTICE_CENTER_HTTP_PORT
ARG VUE_NOTICE_CENTER_HTTP_PORT
ARG VUE_USERINFO_PORT
ARG VUE_SMARTWALE_PORT
ARG JAVA_CLIENT_URI
ARG JAVA_NOTICE_URI
ARG JAVA_FLOWENGINE_URI
ARG JAVE_INTELLIGENTWRITING_URI
ARG JAVA_BIZ_PLATFORM_URI
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENTRYPOINT ["/docker-entrypoint.sh"]
COPY nginx-start.sh /
app
/nginx-start.sh
RUN chmod +x /
app
/nginx-start.sh
COPY nginx-start.sh /
docker-entrypoint.d
/nginx-start.sh
RUN chmod +x /
docker-entrypoint.d
/nginx-start.sh
EXPOSE 80
STOPSIGNAL SIGQUIT
WORKDIR /app
CMD ["
/app/nginx-start.sh
"]
CMD ["
nginx","-g","daemon off;
"]
src/Dockerfile-php
View file @
2ff73c50
FROM phpdockerio/php74-cli
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# apt 国内镜像
COPY <<EOF /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
...
...
@@ -30,9 +31,6 @@ RUN sed -i 's/^listen\s=.*sock/listen = 0.0.0.0:9000/g' /etc/php/7.4/fpm/pool.d/
WORKDIR /app
RUN mkdir /app/www
# 检查扩展是否安装完整
COPY check.sh /app/
RUN chmod +x /app/check.sh && /app/check.sh && rm -f /app/check.sh
# 指定容器启动时执行的命令
CMD ["/usr/sbin/php-fpm7.4","--nodaemonize", "-O"]
# 暴露9000端口
...
...
src/check.sh
deleted
100644 → 0
View file @
3a1e40c4
#/bin/bash
php
-m
|
grep
-q
"bcmath"
&&
echo
"bcmath yes"
||
echo
"bcmath no"
php
-m
|
grep
-q
"Core"
&&
echo
"Core yes"
||
echo
"Core no"
php
-m
|
grep
-q
"ctype"
&&
echo
"ctype yes"
||
echo
"ctype no"
php
-m
|
grep
-q
"curl"
&&
echo
"curl yes"
||
echo
"curl no"
php
-m
|
grep
-q
"date"
&&
echo
"date yes"
||
echo
"date no"
php
-m
|
grep
-q
"dom"
&&
echo
"dom yes"
||
echo
"dom no"
php
-m
|
grep
-q
"fileinfo"
&&
echo
"fileinfo yes"
||
echo
"fileinfo no"
php
-m
|
grep
-q
"filter"
&&
echo
"filter yes"
||
echo
"filter no"
php
-m
|
grep
-q
"gd"
&&
echo
"gd yes"
||
echo
"gd no"
php
-m
|
grep
-q
"hash"
&&
echo
"hash yes"
||
echo
"hash no"
php
-m
|
grep
-q
"iconv"
&&
echo
"iconv yes"
||
echo
"iconv no"
php
-m
|
grep
-q
"imagick"
&&
echo
"imagick yes"
||
echo
"imagick no"
php
-m
|
grep
-q
"imap"
&&
echo
"imap yes"
||
echo
"imap no"
php
-m
|
grep
-q
"intl"
&&
echo
"intl yes"
||
echo
"intl no"
php
-m
|
grep
-q
"json"
&&
echo
"json yes"
||
echo
"json no"
php
-m
|
grep
-q
"libxml"
&&
echo
"libxml yes"
||
echo
"libxml no"
php
-m
|
grep
-q
"mbstring"
&&
echo
"mbstring yes"
||
echo
"mbstring no"
php
-m
|
grep
-q
"mongodb"
&&
echo
"mongodb yes"
||
echo
"mongodb no"
php
-m
|
grep
-q
"mysqli"
&&
echo
"mysqli yes"
||
echo
"mysqli no"
php
-m
|
grep
-q
"mysqlnd"
&&
echo
"mysqlnd yes"
||
echo
"mysqlnd no"
php
-m
|
grep
-q
"openssl"
&&
echo
"openssl yes"
||
echo
"openssl no"
php
-m
|
grep
-q
"pcntl"
&&
echo
"pcntl yes"
||
echo
"pcntl no"
php
-m
|
grep
-q
"pcre"
&&
echo
"pcre yes"
||
echo
"pcre no"
php
-m
|
grep
-q
"PDO"
&&
echo
"PDO yes"
||
echo
"PDO no"
php
-m
|
grep
-q
"pdo_mysql"
&&
echo
"pdo_mysql yes"
||
echo
"pdo_mysql no"
php
-m
|
grep
-q
"pdo_pgsql"
&&
echo
"pdo_pgsql yes"
||
echo
"pdo_pgsql no"
php
-m
|
grep
-q
"Phar"
&&
echo
"Phar yes"
||
echo
"Phar no"
php
-m
|
grep
-q
"posix"
&&
echo
"posix yes"
||
echo
"posix no"
php
-m
|
grep
-q
"protobuf"
&&
echo
"protobuf yes"
||
echo
"protobuf no"
php
-m
|
grep
-q
"rdkafka"
&&
echo
"rdkafka yes"
||
echo
"rdkafka no"
php
-m
|
grep
-q
"readline"
&&
echo
"readline yes"
||
echo
"readline no"
php
-m
|
grep
-q
"redis"
&&
echo
"redis yes"
||
echo
"redis no"
php
-m
|
grep
-q
"Reflection"
&&
echo
"Reflection yes"
||
echo
"Reflection no"
php
-m
|
grep
-q
"session"
&&
echo
"session yes"
||
echo
"session no"
php
-m
|
grep
-q
"SimpleXML"
&&
echo
"SimpleXML yes"
||
echo
"SimpleXML no"
php
-m
|
grep
-q
"sockets"
&&
echo
"sockets yes"
||
echo
"sockets no"
php
-m
|
grep
-q
"SPL"
&&
echo
"SPL yes"
||
echo
"SPL no"
php
-m
|
grep
-q
"standard"
&&
echo
"standard yes"
||
echo
"standard no"
php
-m
|
grep
-q
"swoole"
&&
echo
"swoole yes"
||
echo
"swoole no"
php
-m
|
grep
-q
"sysvmsg"
&&
echo
"sysvmsg yes"
||
echo
"sysvmsg no"
php
-m
|
grep
-q
"sysvsem"
&&
echo
"sysvsem yes"
||
echo
"sysvsem no"
php
-m
|
grep
-q
"sysvshm"
&&
echo
"sysvshm yes"
||
echo
"sysvshm no"
php
-m
|
grep
-q
"tideways_xhprof"
&&
echo
"tideways_xhprof yes"
||
echo
"tideways_xhprof no"
php
-m
|
grep
-q
"tidy"
&&
echo
"tidy yes"
||
echo
"tidy no"
php
-m
|
grep
-q
"tokenizer"
&&
echo
"tokenizer yes"
||
echo
"tokenizer no"
php
-m
|
grep
-q
"xlswriter"
&&
echo
"xlswriter yes"
||
echo
"xlswriter no"
php
-m
|
grep
-q
"xml"
&&
echo
"xml yes"
||
echo
"xml no"
php
-m
|
grep
-q
"xmlreader"
&&
echo
"xmlreader yes"
||
echo
"xmlreader no"
php
-m
|
grep
-q
"xmlrpc"
&&
echo
"xmlrpc yes"
||
echo
"xmlrpc no"
php
-m
|
grep
-q
"xmlwriter"
&&
echo
"xmlwriter yes"
||
echo
"xmlwriter no"
php
-m
|
grep
-q
"xsl"
&&
echo
"xsl yes"
||
echo
"xsl no"
php
-m
|
grep
-q
"Zend OPcache"
&&
echo
"Zend OPcache yes"
||
echo
"Zend OPcache no"
php
-m
|
grep
-q
"zip"
&&
echo
"zip yes"
||
echo
"zip no"
php
-m
|
grep
-q
"zlib"
&&
echo
"zlib yes"
||
echo
"zlib no"
\ No newline at end of file
src/nginx-start.sh
View file @
2ff73c50
...
...
@@ -577,6 +577,4 @@ CONSULTANT_MODULE_URL=$HOST:1234#缺省
MEMBER_MODULE_URL=
$HOST
:
$GALAXY_MEMBER_API_HTTP_PORT
PRESALE_MODULE_URL=
$HOST
:
$GALAXY_PRESALE_MICROS_API_HTTP_PORT
WORKFLOW_MODULE_URL=
$HOST
:
$GALAXY_FLOW_MICROS_API_HTTP_PORT
EOL
exec
nginx
-g
"daemon off;"
\ No newline at end of file
EOL
\ No newline at end of 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