mirror of
https://github.com/booklore-app/booklore.git
synced 2025-12-23 14:20:48 -05:00
* fixing permissions to be able to run springboot with given UID and GID * Adding USER_ID and GROUP_ID to specify permission without making breaking change * move su exec to start.sh --------- Co-authored-by: Aditya Chandel <8075870+adityachandelgit@users.noreply.github.com>
18 lines
435 B
Bash
18 lines
435 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
|
|
su-exec ${USER_ID:-0}:${GROUP_ID:-0} java -jar /app/app.jar |