diff --git a/ecosystem.config.js b/ecosystem.config.js new file mode 100644 index 0000000..4323c0a --- /dev/null +++ b/ecosystem.config.js @@ -0,0 +1,24 @@ +module.exports = { + apps: [ + { + name: "music-admin", + script: ".output/server/index.mjs", + cwd: "/var/www/music/music-admin", + instances: 1, + autorestart: true, + watch: false, + max_memory_restart: "1G", + env: { + NODE_ENV: "production", + PORT: 3000, + DATABASE_URL: + "postgresql://musicuser:Tjqjqhdks$321@localhost:5432/musicdb", + JWT_SECRET: "vTEq9OTvIFs3ZbDaszLRL/ZiAEXziemX1Wh1GIeb+DI=", + }, + error_file: "/var/log/music-admin-error.log", + out_file: "/var/log/music-admin-out.log", + log_file: "/var/log/music-admin.log", + time: true, + }, + ], +}; diff --git a/webhook-ecosystem.config.cjs b/webhook-ecosystem.config.cjs index a4b4ac6..5ff9609 100644 --- a/webhook-ecosystem.config.cjs +++ b/webhook-ecosystem.config.cjs @@ -2,7 +2,7 @@ module.exports = { apps: [ { name: "music-admin-webhook", - script: "webhook-server.js", + script: "webhook-server.cjs", cwd: "/var/www/music/music-admin", instances: 1, autorestart: true, diff --git a/webhook-ecosystem.config.js b/webhook-ecosystem.config.js new file mode 100644 index 0000000..a4b4ac6 --- /dev/null +++ b/webhook-ecosystem.config.js @@ -0,0 +1,20 @@ +module.exports = { + apps: [ + { + name: "music-admin-webhook", + script: "webhook-server.js", + cwd: "/var/www/music/music-admin", + instances: 1, + autorestart: true, + watch: false, + max_memory_restart: "100M", + env: { + NODE_ENV: "production", + }, + error_file: "/var/log/music-admin-webhook-error.log", + out_file: "/var/log/music-admin-webhook-out.log", + log_file: "/var/log/music-admin-webhook.log", + time: true, + }, + ], +}; diff --git a/webhook-server.js b/webhook-server.cjs similarity index 100% rename from webhook-server.js rename to webhook-server.cjs