Actually add healthcheck
This commit is contained in:
parent
e12b20b8a3
commit
73c3900f75
2 changed files with 18 additions and 5 deletions
7
.github/workflows/mitm-proxy.yml
vendored
7
.github/workflows/mitm-proxy.yml
vendored
|
@ -20,6 +20,7 @@ jobs:
|
||||||
name: "MITM proxy with Healthchecks"
|
name: "MITM proxy with Healthchecks"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
max-parallel: 15
|
max-parallel: 15
|
||||||
matrix:
|
matrix:
|
||||||
mitmproxy:
|
mitmproxy:
|
||||||
|
@ -69,7 +70,7 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
mitmproxy
|
mitm-proxy
|
||||||
|
|
||||||
- name: "Setup: Login to Docker Hub"
|
- name: "Setup: Login to Docker Hub"
|
||||||
if: ${{ !env.ACT }}
|
if: ${{ !env.ACT }}
|
||||||
|
@ -91,6 +92,10 @@ jobs:
|
||||||
context: mitm-proxy
|
context: mitm-proxy
|
||||||
build-contexts: |
|
build-contexts: |
|
||||||
mitmproxy/mitmproxy=docker-image://mitmproxy/mitmproxy:${{ matrix.mitmproxy }}
|
mitmproxy/mitmproxy=docker-image://mitmproxy/mitmproxy:${{ matrix.mitmproxy }}
|
||||||
|
build-args: |
|
||||||
|
MITMPROXY_VERSION=${{ matrix.mitmproxy }}
|
||||||
|
GIT_SHA=${{ github.sha }}
|
||||||
|
BUILD_DATE=${{ github.event.repository.pushed_at }}
|
||||||
platforms: ${{ (!env.ACT && !(startsWith('6.',matrix.mitmproxy) || startsWith('5.', matrix.mitmproxy))) && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
|
platforms: ${{ (!env.ACT && !(startsWith('6.',matrix.mitmproxy) || startsWith('5.', matrix.mitmproxy))) && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
|
||||||
pull: true
|
pull: true
|
||||||
push: true
|
push: true
|
||||||
|
|
|
@ -1,9 +1,17 @@
|
||||||
# From upstream redis
|
# From upstream redis
|
||||||
# hadolint ignore=DL3007
|
# hadolint ignore=DL3007
|
||||||
FROM mitmproxy/mitmproxy
|
FROM mitmproxy/mitmproxy
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG GIT_SHA
|
||||||
|
ARG MITM_VERSION
|
||||||
LABEL maintainer="Matthew Baggett <matthew@baggett.me>" \
|
LABEL maintainer="Matthew Baggett <matthew@baggett.me>" \
|
||||||
org.label-schema.vcs-url="https://github.com/benzine-framework/docker" \
|
org.opencontainers.image.source="https://github.com/benzine-framework/docker/mitm-proxy" \
|
||||||
org.opencontainers.image.source="https://github.com/benzine-framework/docker"
|
org.opencontainers.image.title="mitm-proxy with healthcheck" \
|
||||||
|
org.opencontainers.image.created="${BUILD_DATE}" \
|
||||||
|
org.opencontainers.image.version="${MITM_VERSION}" \
|
||||||
|
org.opencontainers.image.revision="${GIT_SHA}" \
|
||||||
|
org.opencontainers.image.vendor="Benzine" \
|
||||||
|
org.opencontainers.image.authors="Matthew Baggett <matthew@baggett.me>"
|
||||||
|
|
||||||
# Install curl
|
# Install curl
|
||||||
# hadolint ignore=DL3018,DL4006
|
# hadolint ignore=DL3018,DL4006
|
||||||
|
@ -31,5 +39,5 @@ RUN os=$(grep "^ID=" < /etc/os-release | cut -f2 -d'=') && \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add healthcheck
|
# Add healthcheck
|
||||||
#HEALTHCHECK --interval=30s --timeout=3s \
|
HEALTHCHECK --interval=30s --timeout=3s \
|
||||||
# CMD redis-cli PING
|
CMD curl -I -x http://localhost:8080 -k https://www.google.com || exit 1
|
||||||
|
|
Loading…
Reference in a new issue