From 9334932fc10b817665da94dd6904f8cda91aabe4 Mon Sep 17 00:00:00 2001 From: Lucy Cifferello <12953208+elvece@users.noreply.github.com> Date: Tue, 15 Feb 2022 12:56:26 -0700 Subject: [PATCH] update web health check, lan config, and opt in for fake dependency --- Dockerfile | 2 ++ check-web.sh | 13 +++++++++++++ manifest.yaml | 10 +++++----- 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 check-web.sh diff --git a/Dockerfile b/Dockerfile index 2bb985f..0282177 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,8 @@ RUN apk add tini curl ADD ./hello-world/target/aarch64-unknown-linux-musl/release/hello-world /usr/local/bin/hello-world ADD ./docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh RUN chmod a+x /usr/local/bin/docker_entrypoint.sh +ADD ./check-web.sh /usr/local/bin/check-web.sh +RUN chmod +x /usr/local/bin/check-web.sh WORKDIR /root diff --git a/check-web.sh b/check-web.sh new file mode 100644 index 0000000..6f43e40 --- /dev/null +++ b/check-web.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +DURATION=$(&2 + exit 1 + fi +fi \ No newline at end of file diff --git a/manifest.yaml b/manifest.yaml index 80cc324..1be14cb 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -60,8 +60,8 @@ health-checks: description: Ensures the network interface is accessible via HTTP. type: docker image: main - entrypoint: "sh" - args: ["-c", "curl --silent --show-error --fail http://localhost:80"] + entrypoint: "check-web.sh" + args: [] # When `inject` is true, the health check will use the main image to run the health check. This is faster as there is no need to spin up an additional docker container # When `inject` is false, the health check will use whatever image is specified. This is useful when using a system image with additional utilities to run a health check. If inject=false, then system must equal true inject: true @@ -120,7 +120,7 @@ dependencies: # Specifies the requirement type of the dependency requirement: # "Opt-out" means the dependency will be required according to the default config. "Opt-in" means the dependency may be required if you change the config. And "required" just means it's always required. - type: "opt-out" + type: "opt-in" # An explanation of how to opt-in or opt-out. This value is optional for type=required how: Optionally use the selected dependency # Description of the dependency relationship @@ -149,8 +149,8 @@ interfaces: 80: "80" # Port mappings are from the external port to the internal container port lan-config: - 80: - ssl: false + 443: + ssl: true internal: 80 # Denotes if the service has a user interface to display ui: true