Skip to content

Commit

Permalink
Init multi-repo setup upon Docker container start-up
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Wurster <[email protected]>
  • Loading branch information
miwurster authored and lharzenetter committed May 29, 2020
1 parent 5bbb071 commit 74a08d3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ org.eclipse.winery.frontends/app/tosca-management/src/assets/built-codeEdit15_1/
!org.eclipse.winery.frontends/app/workflowmodeler/src/app/components/node
!org.eclipse.winery.frontends/app/topologymodeler/src/app/node
Dockerfile
deploy
docs
graphics
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ LABEL maintainer = "Oliver Kopp <[email protected]>, Michael Wurster <miwurster
ENV WINERY_USER_ID 1724
ENV WINERY_USER_HOME /opt/winery
ENV WINERY_REPOSITORY_URL ""
ENV WINERY_DEPENDENT_REPOSITORIES ""
ENV WINERY_HEAP_MAX 2048m
ENV WINERY_JMX_ENABLED ""
ENV CONTAINER_HOSTNAME localhost
Expand Down
7 changes: 7 additions & 0 deletions deploy/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ services:
WINERY_REPOSITORY_PROVIDER: "yaml"
# use to clone a modeling repository on container start
# WINERY_REPOSITORY_URL: "https://github.com/radon-h2020/radon-particles"
# use to set up multiple dependent modeling repositories
# WINERY_DEPENDENT_REPOSITORIES: |
# [ {
# "name" : "RADON Particles",
# "url" : "https://github.com/radon-h2020/radon-particles.git",
# "branch" : "master"
# } ]
ports:
- '8080:8080'
# use to mount an existing modeling repository from your host machine
Expand Down
11 changes: 10 additions & 1 deletion docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ else
if [ ! "x${WINERY_REPOSITORY_URL}" = "x" ]; then
git clone ${WINERY_REPOSITORY_URL} ${WINERY_REPOSITORY_PATH};
else
git init $WINERY_REPOSITORY_PATH;
git init ${WINERY_REPOSITORY_PATH};
fi
fi
if [ ! "x${WINERY_DEPENDENT_REPOSITORIES}" = "x" ]; then
FILE=${WINERY_REPOSITORY_PATH}/repositories.json
if [ -f "${FILE}" ]; then
mv ${WINERY_REPOSITORY_PATH} workspace
mkdir -p ${WINERY_REPOSITORY_PATH}
mv workspace ${WINERY_REPOSITORY_PATH}
fi
echo ${WINERY_DEPENDENT_REPOSITORIES} > ${FILE}
fi
cd ${WINERY_REPOSITORY_PATH}
export CATALINA_OPTS="-Djava.security.egd=file:/dev/./urandom -Xms512m -Xmx${WINERY_HEAP_MAX} -Duser.home=${WINERY_USER_HOME}"
if [ ! "x${WINERY_JMX_ENABLED}" = "x" ]; then
Expand Down

0 comments on commit 74a08d3

Please sign in to comment.