Skip to content

Commit

Permalink
chore(Setup): update .gitignore to include data and logs directories;…
Browse files Browse the repository at this point in the history
… add ecosystem.config.js for PM2 process management configuration
  • Loading branch information
chocoOnEstrogen committed Dec 3, 2024
1 parent 67a1689 commit d241fe6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@ coverage/
*.spec

# Ignore data directory
data/
data/

# PM2 Logs
logs/
29 changes: 29 additions & 0 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
apps: [{
name: 'AnimeStream',
script: 'dist/index.js',
watch: false,
instances: 1,
autorestart: true,
max_memory_restart: '1G',
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
},
log_date_format: 'YYYY-MM-DD HH:mm:ss',
error_file: 'logs/error.log',
out_file: 'logs/out.log',
merge_logs: true,
time: true,
// Graceful shutdown
kill_timeout: 5000,
// Restart delay
restart_delay: 4000,
// Auto restart if memory exceeds 1GB
max_memory_restart: '1G',
// Specify node args if needed
node_args: '--max-old-space-size=1024',
}]
}

0 comments on commit d241fe6

Please sign in to comment.