diff --git a/.gitea/workflows/deploy-to-test.yml b/.gitea/workflows/deploy-to-test.yml index e513a019..d37d364c 100644 --- a/.gitea/workflows/deploy-to-test.yml +++ b/.gitea/workflows/deploy-to-test.yml @@ -360,7 +360,7 @@ jobs: echo "Installing production dependencies and restarting test server..." cd /var/www/flyer-crawler-test.projectium.com - npm install --omit=dev # Install only production dependencies + npm install --omit=dev # Use `startOrReload` with the ecosystem file. This is the standard, idempotent way to deploy. # It will START the process if it's not running, or RELOAD it if it is. # We also add `&& pm2 save` to persist the process list across server reboots. diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs index 4fbac834..bd402335 100644 --- a/ecosystem.config.cjs +++ b/ecosystem.config.cjs @@ -21,10 +21,17 @@ module.exports = { }, // Test Environment Settings env_test: { - NODE_ENV: 'development', // Use 'development' for test to enable more verbose logging if needed + NODE_ENV: 'test', // Set to 'test' to match the environment purpose and disable pino-pretty name: 'flyer-crawler-api-test', cwd: '/var/www/flyer-crawler-test.projectium.com', }, + // Development Environment Settings + env_development: { + NODE_ENV: 'development', + name: 'flyer-crawler-api-dev', + watch: true, + ignore_watch: ['node_modules', 'logs', '*.log', 'flyer-images', '.git'], + }, }, { // --- General Worker --- @@ -39,10 +46,17 @@ module.exports = { }, // Test Environment Settings env_test: { - NODE_ENV: 'development', + NODE_ENV: 'test', name: 'flyer-crawler-worker-test', cwd: '/var/www/flyer-crawler-test.projectium.com', }, + // Development Environment Settings + env_development: { + NODE_ENV: 'development', + name: 'flyer-crawler-worker-dev', + watch: true, + ignore_watch: ['node_modules', 'logs', '*.log', 'flyer-images', '.git'], + }, }, { // --- Analytics Worker --- @@ -57,10 +71,17 @@ module.exports = { }, // Test Environment Settings env_test: { - NODE_ENV: 'development', + NODE_ENV: 'test', name: 'flyer-crawler-analytics-worker-test', cwd: '/var/www/flyer-crawler-test.projectium.com', }, + // Development Environment Settings + env_development: { + NODE_ENV: 'development', + name: 'flyer-crawler-analytics-worker-dev', + watch: true, + ignore_watch: ['node_modules', 'logs', '*.log', 'flyer-images', '.git'], + }, }, ], }; diff --git a/src/services/logger.server.ts b/src/services/logger.server.ts index 5b6684ee..f2e6d8df 100644 --- a/src/services/logger.server.ts +++ b/src/services/logger.server.ts @@ -34,6 +34,9 @@ export const logger = pino({ '*.body.password', '*.body.newPassword', '*.body.currentPassword', + '*.body.confirmPassword', + '*.body.refreshToken', + '*.body.token', ], censor: '[REDACTED]', },