-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.json
More file actions
98 lines (97 loc) · 5.71 KB
/
config.json
File metadata and controls
98 lines (97 loc) · 5.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
apps : [
{
name : "server", // name of process in PM2 manager console
script : "./server.js", // file to bootstrap
exec_mode : "cluster", // for scaling
instances : 1, // # of processes at start
watch : ["core","server.js"], // file to watch for auto restart
env_local : { // "local" in pm2 start config.json --env local
"NODE_ENV" : "local", // e.g. process.env.NODE_ENV = "local"
"PORT" : 3000, // server port
"HOST" : '0.0.0.0', // server host
"DB_URL" : 'mongodb://localhost:27017/app', // connection string to MongoDB
"JWT_SECRET" : 'SkyFall', // json web token secret
"SESSION_TIMER" : "7 days", // time config for user session
"FORGOT_PASS_TIMER" : "24h", // time config for password recovery token
"FB_CLIENT_ID" : "111100106689192", // Facebook ID for login with Facebook
"FB_CLIENT_SEC" : "111111111101330ab2e7672142d06040", // Facebook secret
"FB_CALLBACK_URL" : "http://localhost:3000/api/v1/loginWithFacebookCb", // callback
"PUBLIC" : "/Users/sontran/Doc/server/public/", // path to your public folder
"FILES" : "/Users/son/Dropbox/FILES/resell", // path to store your server files
"MAIL_NO_REPLY" : {service: "gmail", // config server mail
auth: {
user: "example@gmail.com",
pass: "password"
}
},
"ERR_MAIL" : {service: "gmail", // config system mail
auth: {
user: "example@gmail.com",
pass: "password"
}
},
"SERVER_ADMIN_EMAIL": 'admin_mail@example.com', // email to receive system alerts
"SERVER_NAME" : "Local Server", // name of your server in email
},
env_production : { // "production" in pm2 start config.json --env production
"NODE_ENV" : "production",
"PORT" : 5600,
"HOST" : '127.0.0.1',
"DB_URL" : 'mongodb://localhost:27017/production',
"JWT_SECRET" : '111111',
"SESSION_TIMER" : "30 days",
"FORGOT_PASS_TIMER" : "24h",
"FB_CLIENT_ID" : "12345678901234",
"FB_CLIENT_SEC" : "123456789023456789234567893456",
"FB_CALLBACK_URL" : "https://example.com/api/v1/loginWithFacebookCb",
"PUBLIC" : "/home/producttion/yourapp/current/public",
"FILES" : "/home/producttion/FILES/",
"MAIL_NO_REPLY" : {service: "gmail",
auth: {
user: "example@gmail.com",
pass: "1234567890"
}
},
"ERR_MAIL" : {service: "gmail",
auth: {
user: "admin@example.com",
pass: "1234567890"
}
},
"SERVER_ADMIN_EMAIL": 'admin_email@example.com',
"SERVER_NAME" : "Production Server",
},
}
],
"deploy" : { // for staging server deployment
"staging" : { // "staging" in pm2 deploy config.json staging setup
"user" : "username", // server user
"host" : ["57.57.57.57"], // server IP
"ref" : "origin/master",
"repo" : "git@gitlab.com:yourcompany.com/yourapp.git", // git link
"key" : "/path/to/key.pem", // path to server pem key in your local
"path" : "/path/to/app", // path to app in your REMOTE server
"ssh_options" : "StrictHostKeyChecking=no",
"pre-deploy-local" : "echo 'This is a local executed command'",
"post-deploy" : "npm install && pm2 startOrRestart config.json --env staging",
"env" : {
"NODE_ENV" : "production",
}
},
"production" : { // for production server deployment
"user" : "username",
"host" : ["229.229.229.229"],
"ref" : "origin/master",
"repo" : "git@gitlab.com:yourcompany.com/yourapp.git",
"key" : "/path/to/key.pem",
"path" : "/path/to/app",
"ssh_options" : "StrictHostKeyChecking=no",
"pre-deploy-local" : "echo 'This is a local executed command'",
"post-deploy" : "npm install && pm2 startOrRestart config.json --env production",
"env" : {
"NODE_ENV" : "production",
}
},
}
}