Major improvements: - Fix file manager paste operation timeout issues for small files - Remove complex copyItem existence checks that caused hangs - Simplify copy commands for better reliability - Add comprehensive timeout protection for move operations - Remove JWT debug logging for production security - Fix nginx SSL variable syntax errors - Default to HTTP-only mode to eliminate setup complexity - Add dynamic SSL configuration switching in containers - Use environment-appropriate SSL certificate paths - Implement proper encryption architecture fixes - Add authentication middleware to all backend services - Resolve WebSocket timing race conditions Breaking changes: - SSL now disabled by default (set ENABLE_SSL=true to enable) - Nginx configurations dynamically selected based on SSL setting - Container paths automatically used in production environment 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
45 lines
1.2 KiB
Bash
45 lines
1.2 KiB
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
export PORT=${PORT:-8080}
|
|
export ENABLE_SSL=${ENABLE_SSL:-false}
|
|
export SSL_PORT=${SSL_PORT:-8443}
|
|
export SSL_CERT_PATH=${SSL_CERT_PATH:-/app/ssl/termix.crt}
|
|
export SSL_KEY_PATH=${SSL_KEY_PATH:-/app/ssl/termix.key}
|
|
|
|
echo "Configuring web UI to run on port: $PORT"
|
|
|
|
# Choose nginx configuration based on SSL setting
|
|
# Default: HTTP-only for easy setup
|
|
# Set ENABLE_SSL=true to use HTTPS with automatic redirect
|
|
if [ "$ENABLE_SSL" = "true" ]; then
|
|
echo "SSL enabled - using HTTPS configuration with redirect"
|
|
NGINX_CONF_SOURCE="/etc/nginx/nginx-https.conf"
|
|
else
|
|
echo "SSL disabled - using HTTP-only configuration (default)"
|
|
NGINX_CONF_SOURCE="/etc/nginx/nginx.conf"
|
|
fi
|
|
|
|
envsubst '${PORT} ${SSL_PORT} ${SSL_CERT_PATH} ${SSL_KEY_PATH}' < $NGINX_CONF_SOURCE > /etc/nginx/nginx.conf.tmp
|
|
mv /etc/nginx/nginx.conf.tmp /etc/nginx/nginx.conf
|
|
|
|
mkdir -p /app/data
|
|
chown -R node:node /app/data
|
|
chmod 755 /app/data
|
|
|
|
echo "Starting nginx..."
|
|
nginx
|
|
|
|
echo "Starting backend services..."
|
|
cd /app
|
|
export NODE_ENV=production
|
|
|
|
if command -v su-exec > /dev/null 2>&1; then
|
|
su-exec node node dist/backend/backend/starter.js
|
|
else
|
|
su -s /bin/sh node -c "node dist/backend/backend/starter.js"
|
|
fi
|
|
|
|
echo "All services started"
|
|
|
|
tail -f /dev/null |