Browse Source

Change build-files. See Redmine 119188

Владимир Томишинец 5 years ago
parent
commit
1bebfe9e7d
2 changed files with 12 additions and 6 deletions
  1. 3 3
      Dockerfile
  2. 9 3
      entrypoint.sh

+ 3 - 3
Dockerfile

@@ -23,7 +23,7 @@ RUN mkdir -p /etc/acme-dns && mkdir -p /var/lib/acme-dns && mkdir /etc/letsencry
     && chmod 0700 /etc/letsencrypt/acme-dns-auth.py
 
 #VOLUME ["/etc/acme-dns", "/var/lib/acme-dns"]
-#ENTRYPOINT ["/entrypoint.sh"]
-EXPOSE 53 80 443
+ENTRYPOINT ["/entrypoint.sh"]
+EXPOSE 53
 EXPOSE 53/udp
-CMD ["./acme-dns"]
+CMD ["./acme-dns" "-c" "/pki/iru/wild/acme-dns/infoclinica.ru.config.cfg"]

+ 9 - 3
entrypoint.sh

@@ -6,11 +6,17 @@
 
 GIT_SSH_COMMAND='ssh -i /tmp/keyfile -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' git clone ${git_url}
 
-if [ $? == '0' ];then
+if [ $? != '0' ]
+then
+    echo "Cannot git clone the ${git_url}"; exit 1
 # Производим рестор БД    
-    zcat /pki/iru/wild/infoclinica.ru.dump.gz | sqlite3 /var/lib/acme-dns/acme-dns.db
+#    zcat /pki/iru/wild/infoclinica.ru.dump.gz | sqlite3 /var/lib/acme-dns/acme-dns.db
+#    chmod 0600 /var/lib/acme-dns/acme-dns.db
+# Подкидываем конфигурационные файлы
+#    cp /pki/iru/wild/acme-dns/infoclinica.ru.config.cfg /etc/acme-dns/config.cfg
 else
-    echo "Cannot git clone the ${git_url}"; exit 1
+    echo "git clone the ${git_url} done"
+    echo "Starting ACME-DNS"
 fi
 
 exec "$@"