|
@@ -1,6 +1,6 @@
|
|
|
FROM registry.sdsys.ru/iru/iru-base:0.1
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
|
-COPY docker-entrypoint.sh /opt/tomcat8/bin/docker-entrypoint.sh
|
|
|
+COPY docker-entrypoint.sh healthcheck.sh /opt/tomcat8/bin/
|
|
|
ENV CATALINA_HOME="/opt/tomcat8"
|
|
|
ENV PATH=$CATALINA_HOME/bin:$PATH \
|
|
|
CATALINA_OPTS="-Dconfig.file=/etc/web-infoclinic/application.conf" \
|
|
@@ -9,7 +9,7 @@ ENV PATH=$CATALINA_HOME/bin:$PATH \
|
|
|
WORKDIR=$CATALINA_HOME \
|
|
|
DB_CLUSTER=mongodb
|
|
|
EXPOSE 8080 8009 2551
|
|
|
-HEALTHCHECK --start-period=300s --interval=15s --timeout=5s --retries=2 CMD curl -f 127.0.0.1:8080/login || exit 1
|
|
|
+HEALTHCHECK --start-period=300s --interval=15s --timeout=5s --retries=2 CMD healthcheck.sh
|
|
|
ARG repo=prod
|
|
|
RUN set -x \
|
|
|
&& curl https://repo.infoclinica.ru/yum/centos/sds-${repo}-portal.repo -o /etc/yum.repos.d/sds-${repo}-portal.repo \
|
|
@@ -17,6 +17,7 @@ RUN set -x \
|
|
|
&& yum install web-registry-admin -y \
|
|
|
&& yum clean all \
|
|
|
&& chmod +x /opt/tomcat8/bin/docker-entrypoint.sh \
|
|
|
+ && chmod +x /opt/tomcat8/bin/healthcheck.sh \
|
|
|
&& chown -R tomcat:tomcat /etc/web-infoclinic
|
|
|
USER tomcat
|
|
|
CMD ["catalina.sh", "run"]
|