Final touches on devcontainer

This commit is contained in:
Adam Outler
2025-10-19 00:39:26 +00:00
parent 62536e4bfb
commit 80c1459442
23 changed files with 845 additions and 77 deletions

View File

@@ -1,4 +1,4 @@
# Every minute check for cron jobs
* * * * * /services/cron_script.sh
* * * * * /services/scripts/cron_script.sh
# Update vendors 4x/d
0 */6 * * * /services/update_vendors.sh
0 */6 * * * /services/scripts/update_vendors.sh

View File

@@ -2,9 +2,9 @@
# first-run-check.sh - Checks and initializes configuration files on first run
# Check for app.conf and deploy if required
if [ ! -f /app/config/app.conf ]; then
mkdir -p /app/config
cp /app/back/app.conf /app/config/app.conf
if [ ! -f ${NETALERTX_CONFIG}/app.conf ]; then
mkdir -p ${NETALERTX_CONFIG}
cp /app/back/app.conf ${NETALERTX_CONFIG}/app.conf
CYAN='\033[1;36m'
RESET='\033[0m'
>&2 printf "%s" "${CYAN}"

View File

@@ -0,0 +1,9 @@
#!/bin/sh
# Initialize required directories and log files
# These must exist before services start to avoid permission/write errors
# TODO - improve with per-directory warning if creation fails
[ ! -d "${NETALERTX_PLUGINS_LOG}" ] && mkdir -p "${NETALERTX_PLUGINS_LOG}"
[ ! -d "${SYSTEM_SERVICES_RUN_LOG}" ] && mkdir -p "${SYSTEM_SERVICES_RUN_LOG}"
[ ! -d "${SYSTEM_SERVICES_RUN_TMP}" ] && mkdir -p "${SYSTEM_SERVICES_RUN_TMP}"
[ ! -f "${LOG_DB_IS_LOCKED}" ] && touch "${LOG_DB_IS_LOCKED}"
[ ! -f "${LOG_EXECUTION_QUEUE}" ] && touch "${LOG_EXECUTION_QUEUE}"

View File

@@ -31,6 +31,12 @@ EOF
>&2 printf "%s" "${RESET}"
}
# If NETALERTX_DEBUG=1 then we will exit
if [ "${NETALERTX_DEBUG}" -eq 1 ]; then
exit 0
fi
failures=0
warn_if_not_dedicated_mount "${NETALERTX_API}"
warn_if_not_dedicated_mount "${NETALERTX_LOG}"

View File

@@ -48,11 +48,7 @@ trap forward_signal INT TERM
# Execute nginx with overrides
# echo the full nginx command then run it
echo "nginx command:"
echo " nginx \
-p \"${RUN_DIR}/\" \
-c \"${SYSTEM_NGINX_CONFIG_FILE}\" \
-g \"error_log ${NETALERTX_LOG}/nginx-error.log; pid ${RUN_DIR}/nginx.pid; daemon off;\" &"
echo "nginx -p \"${RUN_DIR}/\" -c \"${SYSTEM_NGINX_CONFIG_FILE}\" -g \"error_log ${NETALERTX_LOG}/nginx-error.log; pid ${RUN_DIR}/nginx.pid; daemon off;\" &"
nginx \
-p "${RUN_DIR}/" \
-c "${SYSTEM_NGINX_CONFIG_FILE}" \