Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Reverting some changes

Michal Rutka1aa66cd5ebe4
diff --git a/proxy/Dockerfile b/proxy/Dockerfile
index 1364473c4..778685f0a 100644
--- a/proxy/Dockerfile
+++ b/proxy/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:stretch AS builder
+FROM debian:stretch
MAINTAINER [email protected]
# Install utilities
@@ -23,6 +23,12 @@ ARG LUA_VERSION=5.3.4
ARG ACME_PLUGIN_VERSION=0.1.1
ARG DOMAINNAME
ARG LOCAL_CERT_FILE
+ENV DOMAINNAME=${DOMAINNAME:-localhost}
+ENV LOCAL_CERT_FILE=$LOCAL_CERT_FILE
+ENV TERM xterm
+ENV PROXY_LOGLEVEL notice
+ENV PROXY_BACKEND_HOST=${PROXY_BACKEND_HOST:-manager}
+ENV PROXY_BACKEND_PORT=${PROXY_BACKEND_PORT:-8080}
RUN mkdir /tmp/lua && cd /tmp/lua \
&& curl -sSL https://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz -o lua.tar.gz \
@@ -52,22 +58,11 @@ ADD selfsigned /opt/selfsigned
ADD cli.ini /root/.config/letsencrypt/
-COPY entrypoint.sh /
-RUN chmod +x /entrypoint.sh
-
-FROM scratch
-
-ENV DOMAINNAME=${DOMAINNAME:-localhost}
-ENV LOCAL_CERT_FILE=$LOCAL_CERT_FILE
-ENV TERM xterm
-ENV PROXY_LOGLEVEL notice
-ENV PROXY_BACKEND_HOST=${PROXY_BACKEND_HOST:-manager}
-ENV PROXY_BACKEND_PORT=${PROXY_BACKEND_PORT:-8080}
-
-COPY --from=builder / /
EXPOSE 80 443
HEALTHCHECK --interval=3s --timeout=3s --start-period=2s --retries=30 CMD curl --fail --silent http://localhost:80 || exit 1
+COPY entrypoint.sh /
+RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
-CMD ["run"]
+CMD ["run"]
\ No newline at end of file
diff --git a/swarm/swarm-docker-compose.yml b/swarm/swarm-docker-compose.yml
index f1247cdce..7dd60a604 100644
--- a/swarm/swarm-docker-compose.yml
+++ b/swarm/swarm-docker-compose.yml
@@ -53,7 +53,7 @@ services:
# Enable --staging will manage fake certificates, so avoid hitting the rate limits of Let's Encrypt
# when testing (this is important, you are limited to 5 duplicate certificates per week!)
- LE_EXTRA_ARGS: '--staging --logs-dir=/etc/letsencrypt'
+ # LE_EXTRA_ARGS: '--staging --logs-dir=/etc/letsencrypt'
# Traffic should be forwarded to this service (defaults to manager:8080)
# PROXY_BACKEND_HOST: manager
@@ -99,6 +99,8 @@ services:
environment:
+ # It is important that all services have the same timezone and are time synchronized.
+ # Bearer tokens are only valid for minutes, and authentication fails if Keycloak drifts.
TZ: Europe/Amsterdam
# If developer mode is enabled, all setup tasks will be executed on application startup.