boilerplate-nestjs-api-crud/image_files/fsroot/docker-entrypoint.d/31-prepare-shell-env.sh
2023-04-17 10:20:39 +08:00

16 lines
764 B
Bash

# #############################################################################
# Docker Entrypoint scipt - Prepare the shell enviroment
# #############################################################################
# For Bash
cat "/docker-entrypoint.d/files/dot-bashrc.append" >> /home/node/.bashrc
if [ "${ENABLE_DUMMY_DAEMON}" = "true" ]; then
# Assume it is a development environment if ENABLE_DUMMY_DAEMON=true
# Append the following lines for shell operations
echo "export APP_ENV=${APP_ENV}" >> /home/node/.bashrc
echo "export NODE_ENV=${NODE_ENV}" >> /home/node/.bashrc
echo "export LOG_LEVEL=${LOG_LEVEL}" >> /home/node/.bashrc
echo "export APP_PORT=${APP_PORT}" >> /home/node/.bashrc
echo "unset LOG_IN_JSON_FMT" >> /home/node/.bashrc
fi