All tests fixed. Deployment on NAS prepared

This commit is contained in:
aodulov
2025-12-18 07:29:35 +02:00
parent 9cb0d66455
commit 97b4e5de32
37 changed files with 1303 additions and 2083 deletions

25
ecosystem.config.cjs Normal file
View File

@@ -0,0 +1,25 @@
const path = require('path');
module.exports = {
apps: [{
name: 'gymflow',
script: './dist/index.js',
cwd: './server',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
PORT: 3003,
DATABASE_URL: 'file:../prod.db' // Relative to server/dist/index.js? No, relative to CWD if using prisma.
// Actually, prisma runs from where schema is or based on env.
// Let's assume the DB is in the root or server dir.
// In package.json: "start:prod": "cross-env APP_MODE=prod DATABASE_URL=file:./prod.db ... src/index.ts"
// If CWD is ./server, then ./prod.db is inside server/prod.db.
},
env_production: {
NODE_ENV: 'production'
}
}]
};