Fixup
This commit is contained in:
parent
4e684ef0fa
commit
57c9ddd73e
7 changed files with 24 additions and 18 deletions
2
.github/workflows/docker.build.yml
vendored
2
.github/workflows/docker.build.yml
vendored
|
@ -29,6 +29,8 @@ jobs:
|
|||
context: .
|
||||
target: loadbalancer
|
||||
build-args: |
|
||||
MAINTAINER=${{ vars.PUBLIC_MAINTAINER || 'Matthew Baggett <matthew@baggett.me>' }}
|
||||
SOURCE_URL="https://github.com/${{ github.repository }}"
|
||||
GIT_SHA=${{ github.sha }}
|
||||
GIT_BUILD_ID=${{ github.ref_name }}
|
||||
GIT_COMMIT_MESSAGE=${{ github.event.head_commit.message }}
|
||||
|
|
2
.github/workflows/docker.clean.yml
vendored
2
.github/workflows/docker.clean.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
organization: ${{ github.repository_owner }}
|
||||
container: ${{ github.repository_name }}
|
||||
container: docker-swarm-loadbalancer
|
||||
dry-run: true
|
||||
prune-tags-regexes: |
|
||||
^build-${{ github.sha }}$
|
||||
|
|
3
.github/workflows/docker.release.yml
vendored
3
.github/workflows/docker.release.yml
vendored
|
@ -10,7 +10,7 @@ on:
|
|||
|
||||
env:
|
||||
CANDIDATE_IMAGE: ghcr.io/${{ github.repository }}:sha-${{ github.sha }}
|
||||
RELEASE_IMAGE: ghcr.io/${{ github.repository }}:latest
|
||||
RELEASE_IMAGE: ghcr.io/${{ github.repository }}:latest
|
||||
|
||||
jobs:
|
||||
release-ghcr:
|
||||
|
@ -21,4 +21,3 @@ jobs:
|
|||
- run: docker pull ${{ env.CANDIDATE_IMAGE }}
|
||||
- run: docker tag ${{ env.CANDIDATE_IMAGE }} ${{ env.RELEASE_IMAGE }}
|
||||
- run: docker push ${{ env.RELEASE_IMAGE }}
|
||||
|
||||
|
|
2
.github/workflows/docker.validate.yml
vendored
2
.github/workflows/docker.validate.yml
vendored
|
@ -13,7 +13,7 @@ on:
|
|||
- completed
|
||||
|
||||
env:
|
||||
CANDIDATE_IMAGE: ghcr.io/${{ github.repository_owner }}/${{ github.repository_name }}:hash-${{ github.sha }}
|
||||
CANDIDATE_IMAGE: ghcr.io/${{ github.repository }}:hash-${{ github.sha }}
|
||||
|
||||
jobs:
|
||||
validate-install-report:
|
||||
|
|
27
Dockerfile
27
Dockerfile
|
@ -1,11 +1,22 @@
|
|||
# checkov:skip=CKV_DOCKER_3 I don't have time for rootless
|
||||
FROM ghcr.io/benzine-framework/php:cli-8.2 AS loadbalancer
|
||||
|
||||
LABEL maintainer="Matthew Baggett <matthew@baggett.me>" \
|
||||
org.label-schema.vcs-url="https://github.com/benzine-framework/docker-swarm-loadbalancer" \
|
||||
org.opencontainers.image.source="https://github.com/benzine-framework/docker-swarm-loadbalancer"
|
||||
# Allow overriding the default SSL cert subject
|
||||
ARG DEFAULT_SSL_CERT_SUBJECT="/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"
|
||||
ARG PUBLIC_MAINTAINER="Matthew Baggett <matthew@baggett.me>"
|
||||
ARG SOURCE_URL="https://github.com/benzine-framework/docker-swarm-loadbalancer"
|
||||
ARG BUILD_DATE
|
||||
ARG GIT_SHA
|
||||
ARG GIT_BUILD_ID
|
||||
ARG GIT_COMMIT_MESSAGE
|
||||
ENV BUILD_DATE=${BUILD_DATE} \
|
||||
GIT_SHA=${GIT_SHA} \
|
||||
GIT_BUILD_ID=${GIT_BUILD_ID} \
|
||||
GIT_COMMIT_MESSAGE=${GIT_COMMIT_MESSAGE}
|
||||
|
||||
LABEL maintainer="${PUBLIC_MAINTAINER}" \
|
||||
org.label-schema.vcs-url="${SOURCE_URL}" \
|
||||
org.opencontainers.image.source="${SOURCE_URL}"
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
|
@ -83,16 +94,6 @@ COPY src /app/src
|
|||
COPY templates /app/templates
|
||||
RUN chmod +x /app/bin/bouncer
|
||||
|
||||
# stuff some envs from build
|
||||
ARG BUILD_DATE
|
||||
ARG GIT_SHA
|
||||
ARG GIT_BUILD_ID
|
||||
ARG GIT_COMMIT_MESSAGE
|
||||
ENV BUILD_DATE=${BUILD_DATE} \
|
||||
GIT_SHA=${GIT_SHA} \
|
||||
GIT_BUILD_ID=${GIT_BUILD_ID} \
|
||||
GIT_COMMIT_MESSAGE=${GIT_COMMIT_MESSAGE}
|
||||
|
||||
# Create some volumes for logs and certs
|
||||
VOLUME /etc/letsencrypt
|
||||
VOLUME /var/log/bouncer
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
services:
|
||||
bouncer:
|
||||
loadbalancer:
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./src:/app/src
|
||||
|
|
|
@ -8,8 +8,12 @@ services:
|
|||
target: loadbalancer
|
||||
additional_contexts:
|
||||
- php:cli=docker-image://ghcr.io/benzine-framework/php:cli-8.2
|
||||
args:
|
||||
PUBLIC_MAINTAINER: "Matthew Baggett <test@baggett.me>"
|
||||
SOURCE_URL: "https://git.grey.ooo/Benzine/docker-swarm-loadbalancer"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
image: loadbalancer-test
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
|
|
Loading…
Reference in a new issue