forked from winery/winery
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aaf980e
commit 8806bde
Showing
3 changed files
with
14 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ RUN mvn package -DskipTests | |
FROM tomcat:8.5.31 | ||
LABEL maintainer = "Oliver Kopp <[email protected]>, Michael Wurster <[email protected]>, Lukas Harzenetter <[email protected]>" | ||
|
||
ARG WINERY_REPOSITORY_PATH=/var/opentosca/repository | ||
ARG DOCKERIZE_VERSION=v0.3.0 | ||
|
||
ENV WINERY_REPOSITORY_URL "" | ||
|
@@ -28,7 +27,9 @@ ENV WORKFLOWMODELER_HOSTNAME localhost | |
ENV WORKFLOWMODELER_PORT 8080 | ||
ENV TOPOLOGYMODELER_HOSTNAME localhost | ||
ENV TOPOLOGYMODELER_PORT 8080 | ||
ENV WINERY_REPOSITORY_PATH $WINERY_REPOSITORY_PATH | ||
ENV WINERY_REPOSITORY_PATH "/var/opentosca/repository" | ||
ENV WINERY_HOSTNAME localhost | ||
ENV WINERY_PORT 8080 | ||
|
||
RUN rm /dev/random && ln -s /dev/urandom /dev/random \ | ||
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \ | ||
|
@@ -39,26 +40,24 @@ RUN rm /dev/random && ln -s /dev/urandom /dev/random \ | |
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf ${CATALINA_HOME}/webapps/* \ | ||
&& sed -ie "s/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/.\/urandom/g" /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security \ | ||
&& mkdir -p $WINERY_REPOSITORY_PATH \ | ||
&& cd $WINERY_REPOSITORY_PATH \ | ||
&& git init \ | ||
&& git config core.fscache true \ | ||
&& git lfs install \ | ||
&& wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz | ||
|
||
COPY --from=builder /tmp/winery/org.eclipse.winery.repository.rest/target/winery.war ${CATALINA_HOME}/webapps/winery.war | ||
COPY --from=builder /tmp/winery/org.eclipse.winery.frontends/target/tosca-management.war ${CATALINA_HOME}/webapps/ROOT.war | ||
COPY --from=builder /tmp/winery/org.eclipse.winery.frontends/target/topologymodeler.war ${CATALINA_HOME}/webapps/winery-topologymodeler-ui.war | ||
COPY --from=builder /tmp/winery/org.eclipse.winery.frontends/target/topologymodeler.war ${CATALINA_HOME}/webapps/winery-topologymodeler.war | ||
COPY --from=builder /tmp/winery/org.eclipse.winery.frontends/target/workflowmodeler.war ${CATALINA_HOME}/webapps/winery-workflowmodeler.war | ||
|
||
ADD docker/winery.yml.tpl /root/.winery/winery.yml.tpl | ||
|
||
EXPOSE 8080 | ||
|
||
CMD dockerize -template /root/.winery/winery.yml.tpl:/root/.winery/winery.yml \ | ||
&& if [ ! "x${WINERY_REPOSITORY_URL}" = "x" ]; then rm -rf ${WINERY_REPOSITORY_PATH} && git clone ${WINERY_REPOSITORY_URL} ${WINERY_REPOSITORY_PATH}; fi \ | ||
&& if [ ! "x${WINERY_REPOSITORY_URL}" = "x" ]; then git clone ${WINERY_REPOSITORY_URL} ${WINERY_REPOSITORY_PATH}; else git init $WINERY_REPOSITORY_PATH; fi \ | ||
&& cd ${WINERY_REPOSITORY_PATH} \ | ||
&& git config --global core.fscache true \ | ||
&& git lfs install \ | ||
&& echo 'export CATALINA_OPTS="-Djava.security.egd=file:/dev/./urandom -Xms512m -Xmx${WINERY_HEAP_MAX} -XX:MaxPermSize=256m"' > ${CATALINA_HOME}/bin/setenv.sh \ | ||
&& if [ ! "x${WINERY_JMX_ENABLED}" = "x" ]; then echo 'export CATALINA_OPTS="${CATALINA_OPTS} -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmi.port=9010 -Djava.rmi.server.hostname=0.0.0.0 -Dcom.sun.management.jmxremote.ssl=false"' >> ${CATALINA_HOME}/bin/setenv.sh; fi \ | ||
&& chmod a+x ${CATALINA_HOME}/bin/setenv.sh \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters