Skip to content

Commit

Permalink
Healthchecks review (#375)
Browse files Browse the repository at this point in the history
* Replace legacy cont-init.d for Cantaloupe service

Changes the cantaloupe service init such that it respects service
dependencies.

This insures that the precedence for container environment follows what
is outlined in the container-environment service.

* Test compose projects require names.

* Bump github action upload artifact
  • Loading branch information
nigelgbanks authored Feb 6, 2025
1 parent 041ce85 commit 5a61830
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/grype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
with:
cache-read-only: false
arguments: ${{ inputs.image }}:grype ${{ inputs.digest }} --info
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: Grype Reports
name: ${{ inputs.image }} Grype Reports
path: build/**/*-grype.*
8 changes: 0 additions & 8 deletions cantaloupe/rootfs/etc/cont-init.d/01-set-api-secret.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/scripts/cantaloupe-defaults.sh
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/command/with-contenv bash
# shellcheck shell=bash
set -ex

# Set the default value for CANTALOUPE_ENDPOINT_API_SECRET if none provided.
DEFAULT_SECRET=$(openssl rand -hex 16)
cat <<EOF | /usr/local/bin/confd-import-environment.sh
CANTALOUPE_ENDPOINT_API_SECRET="{{ getenv "CANTALOUPE_ENDPOINT_API_SECRET" "${DEFAULT_SECRET}" }}"
EOF
1 change: 1 addition & 0 deletions cantaloupe/tests/ServiceHealthcheck/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
x-common: &common
restart: "no"

name: cantaloupe-servicehealthcheck
services:
cantaloupe:
<<: *common
Expand Down

0 comments on commit 5a61830

Please sign in to comment.