-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Setup): update .gitignore to include data and logs directories;…
… add ecosystem.config.js for PM2 process management configuration
- Loading branch information
1 parent
67a1689
commit d241fe6
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,7 @@ coverage/ | |
*.spec | ||
|
||
# Ignore data directory | ||
data/ | ||
data/ | ||
|
||
# PM2 Logs | ||
logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}] | ||
} |