Browse Source

Make AKKA run

Vadim Surkov 6 years ago
parent
commit
efc6c1a4c0
3 changed files with 4 additions and 4 deletions
  1. 1 1
      Dockerfile
  2. 2 2
      docker-entrypoint.sh
  3. 1 1
      healthcheck.sh

+ 1 - 1
Dockerfile

@@ -13,7 +13,7 @@ ENV PATH=$CATALINA_HOME/bin:$PATH \
     APPNET=labnetwork \
     ADMIN_HOST=admin-lab
 EXPOSE 8090 9000 2551
-HEALTHCHECK --start-period=30s --interval=15s --timeout=5s --retries=2 CMD curl -f -H 'Host:demo.infoclinica.ru' 127.0.0.1:8090/login || exit 1
+HEALTHCHECK --start-period=30s --interval=15s --timeout=5s --retries=2 CMD /tmp/healthcheck.sh
 ARG repo=prod
 ARG version=16.1
 RUN set -x \           

+ 2 - 2
docker-entrypoint.sh

@@ -20,8 +20,8 @@ fi
 
 
 sed -i "s/192.168.201.12:27017/${DB_CLUSTER}/" /etc/web-laboratory/application.conf
-sed -i "s/192.168.201.13/tasks.${ADMIN_HOST}.${APPNET}/" /etc/web-laboratory/application.conf
-sed -i "s/192.168.201.23/${HOSTNAME}.${APPNET}/" /etc/web-laboratory/application.conf
+sed -i "s/192.168.201.13/$(nslookup tasks.${ADMIN_HOST}.${APPNET} | grep Address | tail -n1 | cut -f2 -d' ')/" /etc/web-laboratory/application.conf
+sed -i "s/192.168.201.23/$(nslookup ${HOSTNAME}.${APPNET} | grep Address | tail -n1 | cut -f2 -d' ')/" /etc/web-laboratory/application.conf
 
 #sed -i "s/192\.168\.204\.2x/${HOSTNAME}/" /etc/web-registry-portal/application.conf
 #sed -i "s/communication = \"remote\"/communication = \"socket\"/" /etc/web-registry-portal/application.conf

+ 1 - 1
healthcheck.sh

@@ -2,7 +2,7 @@
 
 containerstart=`stat -c %Z /proc/1`
 curtime=`date +%s`
-if [[ $(($containerstart-$curtime)) -le "180" ]]; then
+if (( curtime-containerstart < 180 )); then
     echo "0"
     exit 0
 fi