Clean up code
This commit is contained in:
@@ -4,11 +4,9 @@ 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
|
||||
@@ -16,12 +14,10 @@ chmod 755 /app/data
|
||||
echo "Starting nginx..."
|
||||
nginx
|
||||
|
||||
# Start backend services
|
||||
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 dist/backend/starter.js
|
||||
else
|
||||
@@ -30,5 +26,4 @@ fi
|
||||
|
||||
echo "All services started"
|
||||
|
||||
# Keep container running
|
||||
tail -f /dev/null
|
||||
Reference in New Issue
Block a user