Skip to content

Commit 8806bde

Browse files
committed
fix dockerfile
1 parent aaf980e commit 8806bde

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

Dockerfile

+8-9
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ RUN mvn package -DskipTests
1616
FROM tomcat:8.5.31
1717
LABEL maintainer = "Oliver Kopp <[email protected]>, Michael Wurster <[email protected]>, Lukas Harzenetter <[email protected]>"
1818

19-
ARG WINERY_REPOSITORY_PATH=/var/opentosca/repository
2019
ARG DOCKERIZE_VERSION=v0.3.0
2120

2221
ENV WINERY_REPOSITORY_URL ""
@@ -28,7 +27,9 @@ ENV WORKFLOWMODELER_HOSTNAME localhost
2827
ENV WORKFLOWMODELER_PORT 8080
2928
ENV TOPOLOGYMODELER_HOSTNAME localhost
3029
ENV TOPOLOGYMODELER_PORT 8080
31-
ENV WINERY_REPOSITORY_PATH $WINERY_REPOSITORY_PATH
30+
ENV WINERY_REPOSITORY_PATH "/var/opentosca/repository"
31+
ENV WINERY_HOSTNAME localhost
32+
ENV WINERY_PORT 8080
3233

3334
RUN rm /dev/random && ln -s /dev/urandom /dev/random \
3435
&& 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 \
3940
&& rm -rf /var/lib/apt/lists/* \
4041
&& rm -rf ${CATALINA_HOME}/webapps/* \
4142
&& 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 \
42-
&& mkdir -p $WINERY_REPOSITORY_PATH \
43-
&& cd $WINERY_REPOSITORY_PATH \
44-
&& git init \
45-
&& git config core.fscache true \
46-
&& git lfs install \
4743
&& wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
4844
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
4945
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
5046

5147
COPY --from=builder /tmp/winery/org.eclipse.winery.repository.rest/target/winery.war ${CATALINA_HOME}/webapps/winery.war
5248
COPY --from=builder /tmp/winery/org.eclipse.winery.frontends/target/tosca-management.war ${CATALINA_HOME}/webapps/ROOT.war
53-
COPY --from=builder /tmp/winery/org.eclipse.winery.frontends/target/topologymodeler.war ${CATALINA_HOME}/webapps/winery-topologymodeler-ui.war
49+
COPY --from=builder /tmp/winery/org.eclipse.winery.frontends/target/topologymodeler.war ${CATALINA_HOME}/webapps/winery-topologymodeler.war
5450
COPY --from=builder /tmp/winery/org.eclipse.winery.frontends/target/workflowmodeler.war ${CATALINA_HOME}/webapps/winery-workflowmodeler.war
5551

5652
ADD docker/winery.yml.tpl /root/.winery/winery.yml.tpl
5753

5854
EXPOSE 8080
5955

6056
CMD dockerize -template /root/.winery/winery.yml.tpl:/root/.winery/winery.yml \
61-
&& if [ ! "x${WINERY_REPOSITORY_URL}" = "x" ]; then rm -rf ${WINERY_REPOSITORY_PATH} && git clone ${WINERY_REPOSITORY_URL} ${WINERY_REPOSITORY_PATH}; fi \
57+
&& if [ ! "x${WINERY_REPOSITORY_URL}" = "x" ]; then git clone ${WINERY_REPOSITORY_URL} ${WINERY_REPOSITORY_PATH}; else git init $WINERY_REPOSITORY_PATH; fi \
58+
&& cd ${WINERY_REPOSITORY_PATH} \
59+
&& git config --global core.fscache true \
60+
&& git lfs install \
6261
&& echo 'export CATALINA_OPTS="-Djava.security.egd=file:/dev/./urandom -Xms512m -Xmx${WINERY_HEAP_MAX} -XX:MaxPermSize=256m"' > ${CATALINA_HOME}/bin/setenv.sh \
6362
&& 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 \
6463
&& chmod a+x ${CATALINA_HOME}/bin/setenv.sh \

docker/winery.yml.tpl

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ ui:
1111
splitting: true
1212
testRefinement: true
1313
endpoints:
14-
container: http\://{{ .Env.CONTAINER_HOSTNAME }}\:{{ .Env.CONTAINER_PORT }}
15-
workflowmodeler: http\://{{ .Env.WORKFLOWMODELER_HOSTNAME }}\:{{ .Env.WORKFLOWMODELER_PORT }}/winery-workflowmodeler
16-
topologymodeler: http\://{{ .Env.TOPOLOGYMODELER_HOSTNAME }}\:{{ .Env.TOPOLOGYMODELER_PORT }}/winery-topologymodeler
17-
repositoryApiUrl: http://localhost:8080/winery
18-
repositoryUiUrl: http://localhost:8080/#
14+
container: http://{{ .Env.CONTAINER_HOSTNAME }}:{{ .Env.CONTAINER_PORT }}
15+
workflowmodeler: http://{{ .Env.WORKFLOWMODELER_HOSTNAME }}:{{ .Env.WORKFLOWMODELER_PORT }}/winery-workflowmodeler
16+
topologymodeler: http://{{ .Env.TOPOLOGYMODELER_HOSTNAME }}:{{ .Env.TOPOLOGYMODELER_PORT }}/winery-topologymodeler
17+
repositoryApiUrl: http://{{ .Env.WINERY_HOSTNAME }}:{{ .Env.WINERY_PORT }}/winery
18+
repositoryUiUrl: http://{{ .Env.WINERY_HOSTNAME }}:{{ .Env.WINERY_PORT }}/#
1919
repository:
2020
provider: file
2121
repositoryRoot: {{ .Env.WINERY_REPOSITORY_PATH }}

org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/plans/plans.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
(ioBtnClicked)="onEditPlanIOParameters($event);">
3131
<div class="button-group pull-right">
3232
<button type="button" class="btn btn-primary"
33-
(click)="onGeneratePlans($event)">
33+
(click)="onGeneratePlans()">
3434
Generate Plans
3535
</button>
3636
</div>

0 commit comments

Comments
 (0)