From f77c7447a9b7fc5e1ec793cf80637f78ddbb001b Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 30 Mar 2021 21:50:52 +0200 Subject: [PATCH 1/5] Trying to fix that build --- Dockerfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 430bcc3..fe5799d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,13 @@ -FROM klakegg/hugo:latest-ext +FROM klakegg/hugo:ext-debian -EXPOSE 1313 +RUN apt update && apt install -y curl git python3 + +EXPOSE 8000 COPY . /src/ -CMD ["server", "--bind", "0.0.0.0", "--environment", "production", "--disableLiveReload", "--baseURL", "https://cloud.autonomic.zone"] +RUN git submodule update --init --recursive + +ENTRYPOINT ["/bin/bash"] + +CMD ["-c", "hugo && python3 -m http.server --bind 0.0.0.0 --directory public 8000"] From 0c15c0b647e0f0e4c5f197c7aa49ecd482c5a409 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 30 Mar 2021 21:51:55 +0200 Subject: [PATCH 2/5] Add healthcheck --- compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compose.yml b/compose.yml index f1c2379..09674bb 100644 --- a/compose.yml +++ b/compose.yml @@ -6,6 +6,12 @@ services: image: "decentral1se/cloud.autonomic.zone:latest" networks: - proxy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8000"] + interval: 10s + timeout: 10s + retries: 10 + start_period: 15s deploy: update_config: failure_action: rollback From 91973289ae2596acc84d576d81be355a3dfc5082 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 30 Mar 2021 21:55:31 +0200 Subject: [PATCH 3/5] Trying to disable git host key checking --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index fe5799d..318f13f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,10 @@ EXPOSE 8000 COPY . /src/ +RUN mkdir -p ~/.ssh + +RUN echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config + RUN git submodule update --init --recursive ENTRYPOINT ["/bin/bash"] From 57183c55ffa614ae93b5ef8053c551f6ddb39924 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 30 Mar 2021 21:58:12 +0200 Subject: [PATCH 4/5] Use HTTPS for submodule git clones --- .gitmodules | 2 +- Dockerfile | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index b76dad5..a458dd9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "themes/cloud.autonomic.zone/assets/scss/bulma"] path = themes/cloud.autonomic.zone/assets/scss/bulma - url = git@github.com:jgthms/bulma.git + url = https://github.com/jgthms/bulma.git diff --git a/Dockerfile b/Dockerfile index 318f13f..fe5799d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,10 +6,6 @@ EXPOSE 8000 COPY . /src/ -RUN mkdir -p ~/.ssh - -RUN echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - RUN git submodule update --init --recursive ENTRYPOINT ["/bin/bash"] From 70ed154e53b90e2272864a77585ae40a2075da3f Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 30 Mar 2021 22:00:12 +0200 Subject: [PATCH 5/5] Fix port --- compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose.yml b/compose.yml index 09674bb..7f7e3f8 100644 --- a/compose.yml +++ b/compose.yml @@ -20,7 +20,7 @@ services: - "traefik.enable=true" - "traefik.http.routers.cloud-autonomic-zone.rule=Host(`${DOMAIN}`)" - "traefik.http.routers.cloud-autonomic-zone.entrypoints=web-secure" - - "traefik.http.services.cloud-autonomic-zone.loadbalancer.server.port=1313" + - "traefik.http.services.cloud-autonomic-zone.loadbalancer.server.port=8000" - "traefik.http.routers.cloud-autonomic-zone.tls.certresolver=${LETS_ENCRYPT_ENV}" networks: