1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-01 16:28:27 +09:00

fix(healthcheck): use default commands instead of yq

this removes yq command and uses grep and awk to get port
This commit is contained in:
파링 2023-02-05 18:38:57 +09:00 committed by GitHub
parent d65e5f6794
commit 0ba5cb31b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -8,9 +8,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \
&& apt-get update \
&& apt-get install -yqq --no-install-recommends \
build-essential wget ca-certificates \
&& wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq \
&& chmod +x /usr/bin/yq
build-essential wget ca-certificates curl
RUN corepack enable
@ -54,7 +52,6 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
USER misskey
WORKDIR /misskey
COPY --from=builder /usr/bin/yq /usr/bin/yq
COPY --chown=misskey:misskey --from=builder /misskey/node_modules ./node_modules
COPY --chown=misskey:misskey --from=builder /misskey/built ./built
COPY --chown=misskey:misskey --from=builder /misskey/packages/backend/node_modules ./packages/backend/node_modules

View File

@ -1,4 +1,4 @@
#!/bin/bash
PORT=$(yq '.port' /misskey/.config/default.yml)
PORT=$(grep '^port:' example.yml | awk 'NR==1{print $2; exit}')
curl -s -S -o /dev/null "http://localhost:${PORT}"