Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/actions/docker-build-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ inputs:
required: false
default: "false"
description: "Whether to push the image to the registry"
load:
required: false
default: "false"
description: "Whether to load the image into the local Docker daemon (for smoke tests)"
registry:
required: false
default: "ghcr.io"
Expand Down Expand Up @@ -47,6 +51,7 @@ runs:
context: .
file: ./${{ inputs.dockerfile }}
push: ${{ inputs.push }}
load: ${{ inputs.load }}
tags: ${{ inputs.image_name }}
build-args: ${{ inputs.build-args }}
platforms: linux/amd64
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,16 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
push: ${{ needs.release-please.outputs.releases_created == 'true' }}
load: "true"
build-args: |
DOTENV_CONFIG_PATH=${{ matrix.service == 'admin' && '.env.prod' || matrix.service == 'web' && '.env.prod' || '.env' }}
VITE_VERSION=${{ steps.pkg-version.outputs.version }}
VITE_COMMIT_HASH=${{ github.sha }}
VERSION=${{ steps.pkg-version.outputs.version }}
COMMIT_HASH=${{ github.sha }}

# Smoke test: verify node runtime is functional inside the built image
- name: Smoke test ${{ matrix.service }}
if: ${{ matrix.enabled && matrix.dockerfile }}
run: |
docker run --rm --entrypoint="" ${{ matrix.image_tag }} node --version
3 changes: 3 additions & 0 deletions admin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,7 @@ WORKDIR /prod/admin

COPY --from=pruned /prod/admin ./

HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD wget -qO/dev/null http://localhost:${SERVER_PORT:-3001}/healthcheck || exit 1

CMD ["node", "./build/server/server.js"]
3 changes: 3 additions & 0 deletions agent.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ WORKDIR /prod/agent

COPY --from=pruned /prod/agent .

HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD curl -f http://localhost:${SERVER_PORT:-3003}/v1/healthcheck || exit 1

CMD ["node", "build/run.js"]
3 changes: 3 additions & 0 deletions api.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ WORKDIR /prod/api

COPY --from=pruned /prod/api .

HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD wget -qO/dev/null http://localhost:${SERVER_PORT:-4010}/v1/healthcheck || exit 1

CMD ["node", "build/run.js"]
3 changes: 3 additions & 0 deletions web.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ WORKDIR /prod/web

COPY --from=pruned /prod/web ./

HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD wget -qO/dev/null http://localhost:${VIRTUAL_PORT:-80}/healthcheck || exit 1

CMD ["node", "./build/server/server.js"]
Loading