diff --git a/docker/Dockerfile.j2 b/docker/Dockerfile.j2 index 74320c73fa39cb4194d1bf7ebfc1b1bd014c1cc3..e333a27c54fd4da055c7230d28c629cedfcea94a 100644 --- a/docker/Dockerfile.j2 +++ b/docker/Dockerfile.j2 @@ -287,9 +287,9 @@ COPY --from=build /app/target/armv7-unknown-linux-gnueabihf/release/bitwarden_rs COPY --from=build app/target/release/bitwarden_rs . {% endif %} -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/aarch64/mysql/Dockerfile b/docker/aarch64/mysql/Dockerfile index 2727b2999c7e03b6f26f75e3fe927f427f7b3514..bc551f646c78ad47eab12b5e6b2c630dccc7da73 100644 --- a/docker/aarch64/mysql/Dockerfile +++ b/docker/aarch64/mysql/Dockerfile @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -124,9 +124,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/aarch64-unknown-linux-gnu/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/aarch64/sqlite/Dockerfile b/docker/aarch64/sqlite/Dockerfile index 882c114f2db8401c190f2b6121a10542a2cdf358..ebbf651102ba1717f69109215dbf80245a8ad1ef 100644 --- a/docker/aarch64/sqlite/Dockerfile +++ b/docker/aarch64/sqlite/Dockerfile @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -118,9 +118,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/aarch64-unknown-linux-gnu/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/amd64/mysql/Dockerfile b/docker/amd64/mysql/Dockerfile index e68435973fb1542273f33080c1343c58369836ce..525ad57e63cefac4378e5814dd41b14633b5e3e8 100644 --- a/docker/amd64/mysql/Dockerfile +++ b/docker/amd64/mysql/Dockerfile @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -92,9 +92,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build app/target/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/amd64/mysql/Dockerfile.alpine b/docker/amd64/mysql/Dockerfile.alpine index 208eca1f3a6f592b1c5e581fd595cec601780a99..92dca50f1fe0a2a5293442e93b3730926a222748 100644 --- a/docker/amd64/mysql/Dockerfile.alpine +++ b/docker/amd64/mysql/Dockerfile.alpine @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -94,9 +94,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/x86_64-unknown-linux-musl/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/amd64/postgresql/Dockerfile b/docker/amd64/postgresql/Dockerfile index 1a9a467b23e0c9e7df6e4486bf893bcb4dd83823..dfbbec9a6d94eae9d004922dfb97a459f2bbddde 100644 --- a/docker/amd64/postgresql/Dockerfile +++ b/docker/amd64/postgresql/Dockerfile @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -92,9 +92,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build app/target/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/amd64/postgresql/Dockerfile.alpine b/docker/amd64/postgresql/Dockerfile.alpine index 968fa287fde9aa83c447252b5cf78d61f96bfa9e..676462d0fa99678721aa11a7e5df8697c8341664 100644 --- a/docker/amd64/postgresql/Dockerfile.alpine +++ b/docker/amd64/postgresql/Dockerfile.alpine @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -94,9 +94,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/x86_64-unknown-linux-musl/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/amd64/sqlite/Dockerfile b/docker/amd64/sqlite/Dockerfile index 860d6875507bafc7122446e165cb31ba2d732256..6855e2d120950f26c17fe5cef6cc6296975d38c3 100644 --- a/docker/amd64/sqlite/Dockerfile +++ b/docker/amd64/sqlite/Dockerfile @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -86,9 +86,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build app/target/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/amd64/sqlite/Dockerfile.alpine b/docker/amd64/sqlite/Dockerfile.alpine index 556a3e3ecbc0396efe5d491463cc0764da9f1533..cd0e8f8c300e2efee578e7ce054cc6b93a1a84a2 100644 --- a/docker/amd64/sqlite/Dockerfile.alpine +++ b/docker/amd64/sqlite/Dockerfile.alpine @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -88,9 +88,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/x86_64-unknown-linux-musl/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/armv6/mysql/Dockerfile b/docker/armv6/mysql/Dockerfile index df0b731a006332efed37c58b87de8b3131173d6f..b9cf8475386229d8d036a556bb0d9af8129470fb 100644 --- a/docker/armv6/mysql/Dockerfile +++ b/docker/armv6/mysql/Dockerfile @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -124,9 +124,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/arm-unknown-linux-gnueabi/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/armv6/sqlite/Dockerfile b/docker/armv6/sqlite/Dockerfile index 26aa0294192c15bbb1b4c7f3fae5f9af43ab4740..7985a6edab0021f0dd65f3bb9f8233c444eda76b 100644 --- a/docker/armv6/sqlite/Dockerfile +++ b/docker/armv6/sqlite/Dockerfile @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -118,9 +118,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/arm-unknown-linux-gnueabi/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/armv7/mysql/Dockerfile b/docker/armv7/mysql/Dockerfile index fbc698eb14b5ec4df6b7b9a13b0de383d57c2ee8..b336b7bb09326dade5c32005db7fdae6760709b3 100644 --- a/docker/armv7/mysql/Dockerfile +++ b/docker/armv7/mysql/Dockerfile @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -123,9 +123,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/armv7-unknown-linux-gnueabihf/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/armv7/sqlite/Dockerfile b/docker/armv7/sqlite/Dockerfile index 597895ac33cfc09662e69529af105af7a89e01ab..2d5733812cee7cb1c9c65fcc7abd339104c29af6 100644 --- a/docker/armv7/sqlite/Dockerfile +++ b/docker/armv7/sqlite/Dockerfile @@ -12,7 +12,7 @@ # - From the console, with the following commands: # docker pull bitwardenrs/web-vault:v2.12.0e # docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.12.0e -# +# # - To do the opposite, and get the tag from the hash, you can do: # docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c FROM bitwardenrs/web-vault@sha256:feb3f46d15738191b9043be4cdb1be2c0078ed411e7b7be73a2f4fcbca01e13c as vault @@ -117,9 +117,9 @@ COPY Rocket.toml . COPY --from=vault /web-vault ./web-vault COPY --from=build /app/target/armv7-unknown-linux-gnueabihf/release/bitwarden_rs . -COPY docker/healthcheck.sh ./healthcheck.sh +COPY docker/healthcheck.sh /healthcheck.sh -HEALTHCHECK --interval=30s --timeout=3s CMD sh healthcheck.sh || exit 1 +HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] # Configures the startup! WORKDIR / diff --git a/docker/healthcheck.sh b/docker/healthcheck.sh index 88c1091a3836705c7ee2474d86348eb980879692..8f9fe9826381737d6232ca40f16f4653213382c0 100755 --- a/docker/healthcheck.sh +++ b/docker/healthcheck.sh @@ -49,4 +49,5 @@ base_path="$(get_base_path "${DOMAIN}")" if [ -n "${ROCKET_TLS}" ]; then s='s' fi -curl --insecure --fail "http${s}://localhost:${ROCKET_PORT}${base_path}/alive" || exit 1 +curl --insecure --fail --silent --show-error \ + "http${s}://localhost:${ROCKET_PORT}${base_path}/alive" || exit 1