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
c02ecaae
Commit
c02ecaae
authored
Sep 13, 2023
by
Kunkka王辉
😲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 参数处理
parent
190b635c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
docker-compose.yaml
docker-compose.yaml
+5
-10
Dockerfile-java
src/Dockerfile-java
+2
-3
No files found.
docker-compose.yaml
View file @
c02ecaae
...
@@ -55,8 +55,6 @@ services:
...
@@ -55,8 +55,6 @@ services:
build
:
build
:
context
:
src
context
:
src
dockerfile
:
Dockerfile-java
dockerfile
:
Dockerfile-java
args
:
-
PROJECT_NAME=notice
image
:
galaxy-java:11
image
:
galaxy-java:11
container_name
:
galaxy-notice-${ENV:-dev}
container_name
:
galaxy-notice-${ENV:-dev}
command
:
[
'
/app/java-start.sh'
,
'
notice'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}
--spring.server.port=80'
]
command
:
[
'
/app/java-start.sh'
,
'
notice'
,
'
--spring.profiles.active=${JAVA_PROFILE:-innerdev}
--spring.server.port=80'
]
...
@@ -67,12 +65,11 @@ services:
...
@@ -67,12 +65,11 @@ services:
-
80
-
80
networks
:
networks
:
-
galaxy-net
-
galaxy-net
restart
:
on-failure
java-biz-platform
:
java-biz-platform
:
build
:
build
:
context
:
src
context
:
src
dockerfile
:
Dockerfile-java
dockerfile
:
Dockerfile-java
args
:
-
PROJECT_NAME=biz-platform
image
:
galaxy-java:11
image
:
galaxy-java:11
container_name
:
galaxy-biz-platform-${ENV:-dev}
container_name
:
galaxy-biz-platform-${ENV:-dev}
volumes
:
volumes
:
...
@@ -83,12 +80,11 @@ services:
...
@@ -83,12 +80,11 @@ services:
-
80
-
80
networks
:
networks
:
-
galaxy-net
-
galaxy-net
restart
:
on-failure
java-flowengine
:
java-flowengine
:
build
:
build
:
context
:
src
context
:
src
dockerfile
:
Dockerfile-java
dockerfile
:
Dockerfile-java
args
:
-
PROJECT_NAME=flowengine
image
:
galaxy-java:11
image
:
galaxy-java:11
container_name
:
galaxy-flowengine-${ENV:-dev}
container_name
:
galaxy-flowengine-${ENV:-dev}
volumes
:
volumes
:
...
@@ -99,12 +95,11 @@ services:
...
@@ -99,12 +95,11 @@ services:
-
80
-
80
networks
:
networks
:
-
galaxy-net
-
galaxy-net
restart
:
on-failure
java-intelligentwriting
:
java-intelligentwriting
:
build
:
build
:
context
:
src
context
:
src
dockerfile
:
Dockerfile-java
dockerfile
:
Dockerfile-java
args
:
-
PROJECT_NAME=intelligentwriting
image
:
galaxy-java:11
image
:
galaxy-java:11
container_name
:
galaxy-intelligentwriting-${ENV:-dev}
container_name
:
galaxy-intelligentwriting-${ENV:-dev}
volumes
:
volumes
:
...
@@ -115,12 +110,11 @@ services:
...
@@ -115,12 +110,11 @@ services:
-
80
-
80
networks
:
networks
:
-
galaxy-net
-
galaxy-net
restart
:
on-failure
java-client
:
java-client
:
build
:
build
:
context
:
src
context
:
src
dockerfile
:
Dockerfile-java
dockerfile
:
Dockerfile-java
args
:
-
PROJECT_NAME=client
image
:
galaxy-java:11
image
:
galaxy-java:11
container_name
:
galaxy-client-${ENV:-dev}
container_name
:
galaxy-client-${ENV:-dev}
volumes
:
volumes
:
...
@@ -131,6 +125,7 @@ services:
...
@@ -131,6 +125,7 @@ services:
-
80
-
80
networks
:
networks
:
-
galaxy-net
-
galaxy-net
restart
:
on-failure
networks
:
networks
:
galaxy-net
:
galaxy-net
:
name
:
galaxy-net
name
:
galaxy-net
...
...
src/Dockerfile-java
View file @
c02ecaae
FROM maven:3.8.4-openjdk-11
FROM maven:3.8.4-openjdk-11
WORKDIR /app
WORKDIR /app
ARG PROJECT_NAME
COPY settings.xml /usr/share/maven/conf/settings.xml
COPY settings.xml /usr/share/maven/conf/settings.xml
COPY <<EOF /app/java-start.sh
COPY <<EOF /app/java-start.sh
#/bin/bash
#/bin/bash
#进入项目
#进入项目
# 接收参数
# 接收参数
if [ -n "$1" ]; then
if [ -n "
\
$1" ]; then
$PROJECT_NAME=$1
PROJECT_NAME="\$1"
shift
shift
fi
fi
cd /app/code/${PROJECT_NAME} && \
cd /app/code/${PROJECT_NAME} && \
...
...
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