Skip to content
Snippets Groups Projects
Commit de32b2cf authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

add docker entrypoint

parent 546a3aa9
No related branches found
No related tags found
1 merge request!53Convert to NetCDF
#!/bin/bash
INSTALL_DATABASE="${INSTALL_DATABASE:-false}";
NETCDF_FILE="${NETCDF_FILE:-"/app/data.nc"}";
NSHM="${NSHM:-"CONUS_2018A"}";
PROJECT="${PROJECT:-nshmp-netcdf}";
# TODO: Remove option to install database in container when deployed to AWS
if [ "${INSTALL_DATABASE}" == "true" ]; then
source "{$HOME}"/.poetry/env;
poetry install;
case "${NSHM}" in
"CONUS_2018A")
poetry run netcdf \
--2018A \
--clean-ascii \
--database-directory="/app/DATA" \
--netcdf-filename="${NETCDF_FILE}";
;;
*)
printf "ERROR: NSHM %s not supported" "${NSHM}";
;;
esac
fi
/usr/bin/java -jar "${PROJECT}.jar" \
"-Dmicronaut.server.context-path=${CONTEXT_PATH}" \
-nshm="${NSHM}" \
-netcdf="${NETCDF_FILE}";
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment