parent
8f28ed2a9b
commit
fcb7e60fa0
@ -0,0 +1,23 @@ |
||||
#!/bin/bash |
||||
|
||||
DATETIME=`date "+%d/%m/%Y %H:%M:%S"` |
||||
COMMIT_HASH=`git log --pretty=format:'%H' -n 1` |
||||
COMMIT_AUTHOR_NAME=`git log --pretty=format:'%an' -n 1` |
||||
COMMIT_AUTHOR_DATE=`git log --pretty=format:'%ad' -n 1` |
||||
COMMIT_AUTHOR_EMAIL=`git log --pretty=format:'%ae' -n 1` |
||||
COMMIT_SUBJECT=`git log --pretty=format:'%s' -n 1` |
||||
|
||||
COMMIT_SUBJECT="${COMMIT_SUBJECT//\'/\"}" |
||||
|
||||
echo "BuildInfo = { |
||||
date: '$DATETIME', |
||||
commit: { |
||||
hash: '$COMMIT_HASH', |
||||
subject: '$COMMIT_SUBJECT', |
||||
author: { |
||||
date: '$COMMIT_AUTHOR_DATE', |
||||
name: '$COMMIT_AUTHOR_NAME', |
||||
email: '$COMMIT_AUTHOR_EMAIL' |
||||
} |
||||
} |
||||
};" > ./BuildInfo.js |
@ -0,0 +1,15 @@ |
||||
#!/bin/bash |
||||
|
||||
if [ ! $1 ]; then |
||||
echo " Example of use: source build.sh production" |
||||
fi |
||||
|
||||
if [ $1 ]; then |
||||
source ./build-info.sh |
||||
export METEOR_SETTINGS=$(cat settings.$1.json) |
||||
meteor build --server rocket.chat --directory /var/www/rocket.chat |
||||
cd /var/www/rocket.chat/bundle/programs/server |
||||
npm install |
||||
cd /var/www/rocket.chat |
||||
pm2 startOrRestart /var/www/rocket.chat/current/pm2.$1.json |
||||
fi |
@ -0,0 +1,18 @@ |
||||
{ |
||||
"apps": [{ |
||||
"name": "rocket.chat", |
||||
"exec_mode": "fork_mode", |
||||
"max_memory_restart" : "400M", |
||||
"log_date_format": "YYYY-MM-DD HH:mm:ss SSS", |
||||
"script": "/var/www/rocket.chat/bundle/main.js", |
||||
"out_file": "/var/log/rocket.chat/app.log", |
||||
"error_file": "/var/log/rocket.chat/err.log", |
||||
"port": "80", |
||||
"env": { |
||||
"MONGO_URL": "mongodb://localhost:27017/rocketchat", |
||||
"MONGO_OPLOG_URL": "mongodb://localhost:27017/local", |
||||
"ROOT_URL": "http://rocket.chat", |
||||
"PORT": "80" |
||||
} |
||||
}] |
||||
} |
Loading…
Reference in new issue