Files
booklore/start.sh
2025-08-22 22:57:03 -06:00

18 lines
403 B
Bash

#!/bin/sh
# Set default and export so envsubst sees it
: "${BOOKLORE_PORT:=6060}"
export BOOKLORE_PORT
# Use envsubst safely
TMP_CONF="/tmp/nginx.conf.tmp"
envsubst '${BOOKLORE_PORT}' < /etc/nginx/nginx.conf > "$TMP_CONF"
# Move to final location
mv "$TMP_CONF" /etc/nginx/nginx.conf
# Start nginx in background
nginx -g 'daemon off;' &
# Start Spring Boot in foreground
exec java -jar /app/app.jar