Update deployment script to ensure persistent data management, enhance backup and restore processes, and improve error handling. Modify .gitignore to exclude sensitive production data and update deployment documentation to reflect changes. Add environment variable loading for production secrets in configuration files.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
// Load environment variables from .env (production secrets)
|
||||
try {
|
||||
// eslint-disable-next-line global-require
|
||||
require('dotenv').config({ path: '/var/www/harheimertc/.env' })
|
||||
} catch (_e) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
apps: [{
|
||||
name: 'harheimertc',
|
||||
@@ -9,7 +17,9 @@ module.exports = {
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
PORT: 3100
|
||||
PORT: 3100,
|
||||
ENCRYPTION_KEY: process.env.ENCRYPTION_KEY,
|
||||
JWT_SECRET: process.env.JWT_SECRET
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user