forked from lmachens/meteor-apm-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mup-placeholder.js
62 lines (58 loc) · 1.48 KB
/
mup-placeholder.js
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
// Copy this file to mup.js and replace placeholders with your info
module.exports = {
servers: {
one: {
host: 'YOUR_SERVER_IP',
username: 'ubuntu',
pem: '~/.ssh/id_rsa.YOUR_PRIVATE_SSH_KEY'
}
},
app: {
name: 'YOUR_APP-apm',
path: '.',
servers: {
one: {}
},
buildOptions: {
serverOnly: true
},
env: {
ROOT_URL: 'https://apm.YOUR_DOMAIN.com',
MONGO_URL: 'mongodb://mongodb/meteor',
MONGO_OPLOG_URL: 'mongodb://mongodb/local',
MAIL_URL: ''
},
docker: {
image: 'abernix/meteord:node-8.9.3-base',
args: [
'-p 11011:11011', // Open up the engine port
'--log-driver json-file', // Without these the Docker log file for Mongo will exhaust disk space
'--log-opt max-size=100m',
'--log-opt max-file=3'
]
},
enableUploadProgressBar: true
},
proxy: {
domains: 'apm.YOUR_DOMAIN.com,apm-engine.YOUR_DOMAIN.com',
ssl: {
forceSSL: true,
letsEncryptEmail: 'contact@YOUR_DOMAIN.com'
}
},
mongo: {
version: '3.4.1',
servers: {
one: {}
}
},
hooks: {
// Using remoteCommand would be simpler here, but it was not working
'post.meteor.start'(api) {
return api.runSSHCommand(
api.getConfig().servers.one,
"docker exec mup-nginx-proxy sed -i '0,/server.*:80/ s/\\(server.*:\\)80/\\111011/1' /etc/nginx/conf.d/default.conf && docker exec mup-nginx-proxy nginx -s reload"
);
}
}
};