blob: e184885637effee556b8574e6000cf4e521c0d76 [file]
FROM myserver:withproxy
#linux 16.04
MAINTAINER Dimitris
WORKDIR /
RUN npm install -g @angular/cli@1.7.3
### PORTAL ####
WORKDIR portal
RUN git clone http://172.18.22.160:8880/gitblit-1.8.0/r/oK/Portal/Backend.git && cd Backend && git checkout DEVELOP_BE
WORKDIR Backend
RUN rm -f -r ./target/portal && rm -f -r ./target/portal.war
RUN mvn install -DskipTests
RUN mv ./target/portal.war /opt/tomcat/webapps/portal.war
### PORTAL FE ####
WORKDIR portal
RUN git clone http://172.18.22.160:8880/gitblit-1.8.0/r/oK/Portal/Frontend.git && cd Frontend && git checkout DEVELOP_FE
WORKDIR Frontend
RUN npm install
RUN ng build --prod
RUN mv ./dist/ /opt/tomcat/webapps/Frontend/
### PLGM FRONTEND ####
WORKDIR gridmeasures
RUN git clone http://172.18.22.160:8880/gitblit-1.8.0/r/oK/PlannedGridMeasures/Frontend.git && cd Frontend && git checkout DEVELOP_FE
WORKDIR Frontend
RUN npm install
RUN ng build --prod
RUN mv ./dist/ /opt/tomcat/webapps/GridMeasuresFrontend/
### DIAGNOSIS APP ####
WORKDIR microservices
RUN git clone http://172.18.22.160:8880/gitblit-1.8.0/r/Dropwizard/Microservices/mics-diagnosis-app.git && cd mics-diagnosis-app && git checkout DEVELOP_FE
WORKDIR mics-diagnosis-app
RUN npm install
RUN ng build --prod
RUN mv ./dist/ /opt/tomcat/webapps/mics-diagnosis-app/
### HOME SERVICE ####
WORKDIR microservices
ARG CACHEBUST=1
RUN git clone http://172.18.22.160:8880/gitblit-1.8.0/r/Dropwizard/Microservices/mics-home-service.git && cd mics-home-service && git checkout DEVELOP_BE
WORKDIR mics-home-service
RUN rm -f -r ./target/mics-home-service && rm -f -r ./target/mics-home-service.war
RUN mvn install -DskipTests
RUN mv ./target/mics-home-service.war /opt/tomcat/webapps/mics-home-service.war
WORKDIR /
### ADD PARAMETER TO TOMCAT CONTEXT ###
RUN sed -i '/<\/Context>/i <Parameter name="OK_PORTAL_ENVIRONMENT" override="false" value="DevLocal"/> <Parameter name="OK_MICS_HOME_ENVIRONMENT" override="false" value="Docker"/>' /opt/tomcat/conf/context.xml
CMD ["/opt/tomcat/bin/catalina.sh", "run"]
EXPOSE 8080