Removed server deploy files, logs and backups directories.

Let user choose any daemon tools and paths as they like.
This commit is contained in:
Wu Cheng-Han 2015-09-15 16:47:03 +08:00
parent 54e48d10ff
commit 69538a26ad
7 changed files with 0 additions and 46 deletions

View file

@ -1 +0,0 @@
web: node app.js

View file

@ -1,7 +0,0 @@
#!/bin/bash
path=./backups
today=$(date +"%Y%m%d")
timestamp=$(date +"%Y%m%d%H%M%S")
mkdir -p $path/$today
pg_dump hackmd > $path/$today/postgresql_$timestamp
mongodump -d hackmd -o $path/$today/mongodb_$timestamp

View file

11
hackmd
View file

@ -1,11 +0,0 @@
/home/hackmd/logs/*.log {
daily
rotate 365
missingok
notifempty
compress
sharedscripts
copytruncate
dateext
dateformat %Y-%m-%d
}

View file

View file

@ -1,19 +0,0 @@
{
"apps": [{
"name": "hackmd",
"script": "app.js",
"exec_mode": "fork",
"instances": 1,
"error_file": "./logs/hackmd-err.log",
"out_file": "./logs/hackmd-out.log",
"pid_file": "./hackmd.pid",
"env": {
"NODE_ENV": "production",
"DATABASE_URL": "change this",
"MONGOLAB_URI": "change this",
"PORT": "80",
"SSLPORT": "443",
"DOMAIN": "change this"
}
}]
}

8
run.sh
View file

@ -1,8 +0,0 @@
#!/bin/bash
forever stop hackmd
DATABASE_URL='change this' \
MONGOLAB_URI='change this' \
PORT='80' \
SSLPORT='443' \
DOMAIN='change this' \
forever -a --uid hackmd -l ./logs/hackmd_log.log -o ./logs/hackmd_out.log -e ./logs/hackmd_error.log start app.js