feat: implement deployment workflow and configure PM2 for backend and frontend applications

This commit is contained in:
2025-06-09 13:13:37 -03:00
parent d57afe93a3
commit 89322f6b9e
4 changed files with 90 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
module.exports = {
apps: [{
name: 'portfolio-frontend', // A name for your application in PM2
script: 'npm', // Tell PM2 to run an npm command
args: 'start', // The argument to pass to npm, which runs 'next start'
instances: 1, // Run a single instance of the application
autorestart: true, // Automatically restart if the app crashes
watch: false, // Do NOT watch for file changes in production
max_memory_restart: '512M', // Restart if it uses more than 512MB of RAM
env: {
NODE_ENV: 'production', // Set the environment to production
}
}]
};