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
77e07b93
Commit
77e07b93
authored
Sep 15, 2023
by
Kunkka王辉
😲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
脚本优化
parent
7ff312eb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
26 deletions
+19
-26
docker-compose.yaml
docker-compose.yaml
+10
-20
Dockerfile-java
src/Dockerfile-java
+4
-1
java-start.sh
src/java-start.sh
+5
-5
No files found.
docker-compose.yaml
View file @
77e07b93
...
...
@@ -65,13 +65,11 @@ services:
build
:
context
:
src
dockerfile
:
Dockerfile-java
image
:
galaxy-
java:11
image
:
harbor.galaxy-immi.com/galaxy-java/
java:11
container_name
:
java-notice-${ENV:-dev}
environment
:
-
PROJECT_NAME=notice
command
:
[
'
java'
,
'
-jar'
,
'
/app/app.jar'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
volumes
:
-
${CODE_DIR}:/app/code
-
${CODE_DIR}
/notice
:/app/code
-
maven-repo:/usr/share/maven/repo
# maven共享repo目录
expose
:
-
80
...
...
@@ -82,13 +80,11 @@ services:
build
:
context
:
src
dockerfile
:
Dockerfile-java
image
:
galaxy-
java:11
image
:
harbor.galaxy-immi.com/galaxy-java/
java:11
container_name
:
java-biz-platform-${ENV:-dev}
volumes
:
-
${CODE_DIR}:/app/code
-
${CODE_DIR}
/biz-platform
:/app/code
-
maven-repo:/usr/share/maven/repo
# maven共享repo目录
environment
:
-
PROJECT_NAME=biz-platform
command
:
[
'
java'
,
'
-jar'
,
'
/app/app.jar'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
expose
:
-
80
...
...
@@ -99,13 +95,11 @@ services:
build
:
context
:
src
dockerfile
:
Dockerfile-java
image
:
galaxy-
java:11
image
:
harbor.galaxy-immi.com/galaxy-java/
java:11
container_name
:
java-flowengine-${ENV:-dev}
volumes
:
-
${CODE_DIR}:/app/code
-
${CODE_DIR}
/flowengine
:/app/code
-
maven-repo:/usr/share/maven/repo
# maven共享repo目录
environment
:
-
PROJECT_NAME=flowengine
command
:
[
'
java'
,
'
-jar'
,
'
/app/app.jar'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
expose
:
-
80
...
...
@@ -116,13 +110,11 @@ services:
build
:
context
:
src
dockerfile
:
Dockerfile-java
image
:
galaxy-
java:11
image
:
harbor.galaxy-immi.com/galaxy-java/
java:11
container_name
:
java-intelligentwriting-${ENV:-dev}
volumes
:
-
${CODE_DIR}:/app/code
-
${CODE_DIR}
/intelligentwriting
:/app/code
-
maven-repo:/usr/share/maven/repo
# maven共享repo目录
environment
:
-
PROJECT_NAME=intelligentwriting
command
:
[
'
java'
,
'
-jar'
,
'
/app/app.jar'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
expose
:
-
80
...
...
@@ -133,13 +125,11 @@ services:
build
:
context
:
src
dockerfile
:
Dockerfile-java
image
:
galaxy-
java:11
image
:
harbor.galaxy-immi.com/galaxy-java/
java:11
container_name
:
java-client-${ENV:-dev}
volumes
:
-
${CODE_DIR}:/app/code
-
${CODE_DIR}
/client
:/app/code
-
maven-repo:/usr/share/maven/repo
# maven共享repo目录
environment
:
-
PROJECT_NAME=client
command
:
[
'
java'
,
'
-jar'
,
'
/app/app.jar'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}'
,
'
--server.port=80'
]
expose
:
-
80
...
...
src/Dockerfile-java
View file @
77e07b93
FROM maven:3.8.4-openjdk-11
ENV TZ=Asia/Shanghai
WORKDIR /app
RUN apt-get autoremove -y && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY settings.xml /usr/share/maven/conf/settings.xml
COPY java-start.sh /app/java-start.sh
...
...
@@ -8,4 +12,3 @@ RUN chmod +x /app/java-start.sh
ENTRYPOINT ["/app/java-start.sh"]
CMD ["java","-jar","app/app.jar"]
src/java-start.sh
View file @
77e07b93
#!/bin/bash
#进入项目
# 接收参数
cd
/app/code/
$PROJECT_NAME
mvn clean package
-B
-DskipTests
mv
/app/code/
$PROJECT_NAME
/target/
*
.jar /app/app.jar
cd
/app/code
if
!
ls
/app/code/target/
*
.jar
>
/dev/null 2>&1
;
then
mvn clean package
-B
-DskipTests
fi
mv
/app/code/target/
*
.jar /app/app.jar
mvn clean
exec
"
$@
"
\ 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