Updated building backend, improved oruitng, indivudal ssh tunnel control.

This commit is contained in:
LukeGus
2025-07-27 18:01:44 -05:00
parent 634e625eef
commit 6ed822c8b2
12 changed files with 188 additions and 214 deletions

View File

@@ -4,9 +4,11 @@ set -e
export PORT=${PORT:-8080}
echo "Configuring web UI to run on port: $PORT"
# Configure nginx with the correct port
envsubst '${PORT}' < /etc/nginx/nginx.conf > /etc/nginx/nginx.conf.tmp
mv /etc/nginx/nginx.conf.tmp /etc/nginx/nginx.conf
# Setup data directory
mkdir -p /app/data
chown -R node:node /app/data
chmod 755 /app/data
@@ -19,12 +21,14 @@ echo "Starting backend services..."
cd /app
export NODE_ENV=production
# Start the compiled TypeScript backend
if command -v su-exec > /dev/null 2>&1; then
su-exec node node src/backend/starter.cjs
su-exec node node dist/backend/starter.js
else
su -s /bin/sh node -c "node src/backend/starter.cjs"
su -s /bin/sh node -c "node dist/backend/starter.js"
fi
echo "All services started"
# Keep container running
tail -f /dev/null