More attempts to fix docker
This commit is contained in:
20
docker-production.js
Normal file
20
docker-production.js
Normal file
@@ -0,0 +1,20 @@
|
||||
// Simple production entry point for Docker
|
||||
// Runs the SvelteKit server only, WebSocket server is run separately
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname } from 'path';
|
||||
import { execFileSync } from 'child_process';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
// Run the SvelteKit production server
|
||||
try {
|
||||
console.log('Starting SvelteKit production server');
|
||||
// Execute the built SvelteKit server directly
|
||||
execFileSync('node', ['build/index.js'], {
|
||||
stdio: 'inherit',
|
||||
cwd: __dirname
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Error running SvelteKit server:', error);
|
||||
process.exit(1);
|
||||
}
|
||||
Reference in New Issue
Block a user