Hitchhiker setting refer to: Configuration, environment variable could be set in pm2.json
IMPORTANT:If upgrade, download zip package and overwrite all files except build/pm2.json which keep all settings of hitchhiker in root folder, then call: pm2 restart hitchhiker.
{
"apps": [{
"name": "hitchhiker",
"script": "./build/index.js",
"watch": false,
"env": {
"HITCHHIKER_APP_HOST": "myhost"
# Set environment variable here
}
}]
}
Deploy step by step
Dependence: nodejs 7.60+, recommend use LTS (8.9) and mysql 5.7+
with json column support;
mysql, create db:
hitchhiker-prod
(or another name),change mysql variablemax_allowed_packet=200M
create DB: CREATE DATABASE IF NOT EXISTS `hitchhiker-prod` default charset utf8 COLLATE utf8_general_ci; change variable: addmax_allowed_packet=200M
under [mysqld] section in /my.conf file, refer to:change max_allowed_packet
Download app package from https://github.com/brookshi/Hitchhiker/releases/download/v0.14/Hitchhiker.zip;
Unzip and run command
node setup.js
(windows),sudo node setup.js
(linux) inbuild
folder;Open
http://localhost:9527/setup.html
in browser;Enter host,port,db,setting etc.. step by step;
Submit;