File tree 3 files changed +56
-0
lines changed
3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ DATETIME=` date " +%d/%m/%Y %H:%M:%S" `
4
+ COMMIT_HASH=` git log --pretty=format:' %H' -n 1`
5
+ COMMIT_AUTHOR_NAME=` git log --pretty=format:' %an' -n 1`
6
+ COMMIT_AUTHOR_DATE=` git log --pretty=format:' %ad' -n 1`
7
+ COMMIT_AUTHOR_EMAIL=` git log --pretty=format:' %ae' -n 1`
8
+ COMMIT_SUBJECT=` git log --pretty=format:' %s' -n 1`
9
+
10
+ COMMIT_SUBJECT=" ${COMMIT_SUBJECT// \' / \" } "
11
+
12
+ echo " BuildInfo = {
13
+ date: '$DATETIME ',
14
+ commit: {
15
+ hash: '$COMMIT_HASH ',
16
+ subject: '$COMMIT_SUBJECT ',
17
+ author: {
18
+ date: '$COMMIT_AUTHOR_DATE ',
19
+ name: '$COMMIT_AUTHOR_NAME ',
20
+ email: '$COMMIT_AUTHOR_EMAIL '
21
+ }
22
+ }
23
+ };" > ./BuildInfo.js
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [ ! $1 ]; then
4
+ echo " Example of use: source build.sh production"
5
+ fi
6
+
7
+ if [ $1 ]; then
8
+ source ./build-info.sh
9
+ export METEOR_SETTINGS=$( cat settings.$1 .json)
10
+ meteor build --server rocket.chat --directory /var/www/rocket.chat
11
+ cd /var/www/rocket.chat/bundle/programs/server
12
+ npm install
13
+ cd /var/www/rocket.chat
14
+ pm2 startOrRestart /var/www/rocket.chat/current/pm2.$1 .json
15
+ fi
Original file line number Diff line number Diff line change
1
+ {
2
+ "apps" : [{
3
+ "name" : " rocket.chat" ,
4
+ "exec_mode" : " fork_mode" ,
5
+ "max_memory_restart" : " 400M" ,
6
+ "log_date_format" : " YYYY-MM-DD HH:mm:ss SSS" ,
7
+ "script" : " /var/www/rocket.chat/bundle/main.js" ,
8
+ "out_file" : " /var/log/rocket.chat/app.log" ,
9
+ "error_file" : " /var/log/rocket.chat/err.log" ,
10
+ "port" : " 80" ,
11
+ "env" : {
12
+ "MONGO_URL" : " mongodb://localhost:27017/rocketchat" ,
13
+ "MONGO_OPLOG_URL" : " mongodb://localhost:27017/local" ,
14
+ "ROOT_URL" : " http://rocket.chat" ,
15
+ "PORT" : " 80"
16
+ }
17
+ }]
18
+ }
You can’t perform that action at this time.
0 commit comments