| FROM myserver:withproxy | |
| #linux 16.04 | |
| MAINTAINER Dimitris | |
| WORKDIR / | |
| ### HOME SERVICE #### | |
| WORKDIR microservices | |
| 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 / | |
| ### DIAGNOSIS APP #### | |
| WORKDIR microservices | |
| # use this lnik if no proxy(WLAN) - http://87.128.212.254:8880/gitblit-1.8.0/r/Dropwizard/Microservices/mics-diagnosis-app.git | |
| 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 -g @angular/cli@1.6.1 | |
| RUN npm install | |
| RUN ng build --prod | |
| RUN mv ./dist/ /opt/tomcat/webapps/mics-diagnosis-app/ | |
| WORKDIR / | |
| ### ADD PARAMETER TO TOMCAT CONTEXT ### | |
| RUN sed -i '/<\/Context>/i <Parameter name="OK_MICS_HOME_ENVIRONMENT" override="false" value="Docker"/>' /opt/tomcat/conf/context.xml | |
| CMD ["/opt/tomcat/bin/catalina.sh", "run"] | |
| EXPOSE 8080 | |