Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ipgallery
/
location-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Registry
Issues
0
Merge Requests
0
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
11c0e917
authored
May 10, 2016
by
amir
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add docker compose run
parent
b2a3a338
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
6 deletions
.gitignore
Dockerfile
build.gradle
.gitignore
View file @
11c0e917
No preview for this file type
Dockerfile
View file @
11c0e917
FROM
172.16.1.132:5000/ipgallery/base-microservice-java
#RUN mkdir -p /opt/mcx/config
#RUN mkdir -p /logs/conf
COPY
build/libs/LocationService-*.jar /usr/
COPY
cfg/config.properties /opt/mcx/config/
#COPY cfg/log4j.xml /logs/conf/
#COPY script/run.sh /usr/
RUN
chmod +x /usr/run.sh
RUN
mv /usr/LocationService-
*
.jar /usr/LocationService.jar
WORKDIR
/usr
EXPOSE
32015
#
EXPOSE 32015
ENTRYPOINT
["/usr/run.sh","/usr/LocationService.jar"]
\ No newline at end of file
build.gradle
View file @
11c0e917
...
...
@@ -32,6 +32,40 @@ jar {
exclude
'META-INF/*.RSA'
,
'META-INF/*.SF'
,
'META-INF/*.DSA'
}
task
buildDockerImage
(
type:
Exec
)
{
dependsOn
jar
mustRunAfter
jar
println
'building docker image'
def
commandWirhArgs
=
[
"docker"
,
"build"
,
"-t"
,
"172.16.1.132.5000/ipgallery/location-service"
,
"."
]
commandLine
commandWirhArgs
}
task
stopDockerCompose
(
type:
Exec
)
{
//dependsOn buildDockerImage
//mustRunAfter buildDockerImage
println
'stopping docker compose...'
def
commandWirhArgs
=
[
"docker-compose"
,
"stop"
]
commandLine
commandWirhArgs
}
task
removeDockerCompose
(
type:
Exec
)
{
dependsOn
stopDockerCompose
mustRunAfter
stopDockerCompose
println
'removing docker compose...'
def
commandWirhArgs
=
[
"docker-compose"
,
"rm"
,
"--force"
]
commandLine
commandWirhArgs
}
task
runDockerCompose
(
type:
Exec
)
{
dependsOn
jar
mustRunAfter
jar
println
'running docker compose...'
// if you want to run in background add "-d"
// if you want to see logs run without -d
def
commandWirhArgs
=
[
"docker-compose"
,
"up"
,
"--force-recreate"
,
"-d"
]
commandLine
commandWirhArgs
}
publishing
{
publications
{
...
...
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