Skip to content

Commit

Permalink
Enable adding JVM options during start using the confdir method
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Sep 21, 2023
1 parent 9db53a8 commit cfb341b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
uses: ./
with:
postgresql_version: 15
jvm_options: |
dataverse.api.signature-secret=eikaizieb2Oghaex
dataverse.pid.datacite.rest-api-url=https://api.datacite.org
create-dv: true
- name: Check Dataverse Setup
run: |
Expand Down
12 changes: 11 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ inputs:
solr_version:
description: "Override the Solr version to use"
required: false
jvm_options:
description: "Line separated key-value pairs of JVM options to be set before startup. Example: dataverse.spi.exporters.directory=/..."
required: false
create-dv:
description: "Whether or not to create an example Dataverse"
required: true
Expand All @@ -32,7 +35,7 @@ runs:
run: |
docker pull -q ${{ inputs.image_dataverse }}:${{ inputs.image_tag }}
docker pull -q ${{ inputs.image_configbaker }}:${{ inputs.image_tag }}
- name: "Prepare environment variables"
- name: "Prepare environment"
shell: bash
run: |
PG_VERSION="${{ inputs.postgresql_version }}"
Expand All @@ -55,6 +58,13 @@ runs:
echo "DATAVERSE_IMAGE=${{ inputs.image_dataverse }}:${{ inputs.image_tag }}" | tee -a "${GITHUB_ENV}"
echo "DATAVERSE_DB_USER=dataverse" | tee -a "${GITHUB_ENV}"
echo "DATAVERSE_DB_PASSWORD=secret" | tee -a "${GITHUB_ENV}"
echo "CONFIG_DIR=${RUNNER_TEMP}/dv/conf" | tee -a "${GITHUB_ENV}"
mkdir -p "${RUNNER_TEMP}/dv/conf"
while IFS= read -r line; do
FILENAME="${RUNNER_TEMP}/dv/conf/$(echo "$line" | cut -f1 -d=)"
echo "$line" | cut -f2- -d= > "$FILENAME"
done < <(printf '%s' "${{ inputs.jvm_options }}")
- name: "Start Dataverse service in background"
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:
- solr
volumes:
- ${RUNNER_TEMP}/dv/data:/dv
- ${CONFIG_DIR}:/secrets
tmpfs:
- /dumps:mode=770,size=2052M,uid=1000,gid=1000
- /tmp:mode=770,size=2052M,uid=1000,gid=1000
Expand Down

0 comments on commit cfb341b

Please sign in to comment.