Skip to content

Commit

Permalink
Update docker-entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
nickevansuk authored Nov 21, 2024
1 parent 44bc8f3 commit 58838c2
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,25 @@
# The `exec` command replaces the current process with the new process, which
# enables signal interactivity (e.g. Ctrl-C).

## INPUT_CONFIG_DIR and INPUT_CONFIG_FILE relate to the `config_dir` and `config_file` inputs in GitHub Actions
## The below is used by the GitHub Action

## Specify the working directory explicitly as GitHub Actions will overwrite it
## Copy any config file specified by `INPUT_CONFIG_DIR` to the config directory (used by GitHub Actions)
## Copy any config directory specified by `INPUT_CONFIG_DIR` to the config directory
if [ -f "${INPUT_CONFIG_DIR}" ]; then
cp "${INPUT_CONFIG_DIR}" /openactive-test-suite/config/
## Reset INPUT_CONFIG_DIR so that the test suite does not use it
export INPUT_CONFIG_DIR=
## Reset NODE_CONFIG_DIR so that the test suite does not use it, to ensure that this directory is used
export NODE_CONFIG_DIR=
fi

## Specify the working directory explicitly as GitHub Actions will overwrite it
## Copy any config file specified by `INPUT_CONFIG_FILE` to the config directory
if [ -f "${INPUT_CONFIG_FILE}" ]; then
cp "${INPUT_CONFIG_FILE}" /openactive-test-suite/config/dev.json
## Configure test suite to use this file
export NODE_ENV=dev
export NODE_APP_INSTANCE=
export NODE_CONFIG_DIR=
fi

# Change directory and start the app
Expand Down

0 comments on commit 58838c2

Please sign in to comment.