feat: Single-port deployment with improved error handling and SvelteKit static build
- Frontend now uses @sveltejs/adapter-static for production builds - Backend serves both API and static files from single port (originally port 3000) - Removed all throw statements from services to avoid Elysia prototype errors - Fixed favicon serving and SvelteKit assets path handling - Added ecosystem.config.js for PM2 process management - Comprehensive deployment documentation (PM2 + HAProxy) - Updated README with single-port architecture - Created start.sh script for easy production start
This commit is contained in:
22
ecosystem.config.js
Normal file
22
ecosystem.config.js
Normal file
@@ -0,0 +1,22 @@
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: 'award-backend',
|
||||
script: 'src/backend/index.js',
|
||||
interpreter: 'bun',
|
||||
cwd: '/path/to/award',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
PORT: 3001
|
||||
},
|
||||
instances: 1,
|
||||
exec_mode: 'fork',
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_memory_restart: '500M',
|
||||
error_file: './logs/backend-error.log',
|
||||
out_file: './logs/backend-out.log',
|
||||
log_date_format: 'YYYY-MM-DD HH:mm:ss Z'
|
||||
}
|
||||
]
|
||||
};
|
||||
Reference in New Issue
Block a user