Added pm2 environment file

This commit is contained in:
henningxtro 2020-12-01 19:24:29 +01:00
parent 09b01a1fe5
commit 7d693939fa

27
Backend/Backend.config.js Normal file
View File

@ -0,0 +1,27 @@
module.exports = {
apps : [{
name: "Backend",
script: 'dist/index.js',
watch: '.',
env: {
"PORT": '3000',
"DB_HOST": 'localhost',
"DB_USER": 'betterzon_admin',
"DB_PASSWORD": 'FezcxEfXWH6sgJfZLfY9Cd5Fyu2NTwEM7i8j',
"DB_DATABASE": 'betterzon_dev'
},
}],
deploy : {
production : {
user : 'SSH_USERNAME',
host : 'SSH_HOSTMACHINE',
ref : 'origin/master',
repo : 'GIT_REPOSITORY',
path : 'DESTINATION_PATH',
'pre-deploy-local': '',
'post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env production',
'pre-setup': ''
}
}
};