-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeploy.conf
More file actions
38 lines (36 loc) · 1.73 KB
/
deploy.conf
File metadata and controls
38 lines (36 loc) · 1.73 KB
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
#!/bin/bash
# The following configuration is an example of how to set up the deployment configuration file.
PROJECT_NAME="Libly"
DEPLOY_DIR="~/.Libly/releases" # The release directory is required. It will be created if it does not exist.
LOG_FILE="log.log" # for the future
SERVERS="libly.liny.studio," # list of servers to deploy to. Comma separated. The script will loop through each server and deploy to it.
TYPE="domain" # type of lookup (domain or ip)
SERVICES="" # Service names to restart after deployment. Best to pass this to on the command line. Defining it here will cause all services to be restarted which is a bad idea.
NODE_HOME="./api" # use relative path
SETUP_COMMAND="cd ~/.Libly/current/client && npm run build" # Command to run after deployment. This is optional. If not defined, the script will not run any command after deployment.
# This should contain the file name of the js file to modify. This file should be reserved for API HOSTNAME definition. It is optional.
JSHOST="web_client/static/scripts/API_HOST.js" # Inside the file, the definition should be like this: "export const API_HOST = undefined;" undefined will be replaced with the hostname of the server.
SSH_USER="ubuntu"
SSH_PORT="22" # Currently not used. The script will use the default port 22 as most servers are using this port.
SSH_KEY="~/.ssh/id_rsa" # Path to your SSH private key
log_message() {
local message="$1"
local loglevel="$2"
echo -e "$(date '+%Y-%m-%d %H:%M:%S') - $message" >> "$LOG_FILE"
}
export PROJECT_NAME
export DEPLOY_DIR
export LOG_FILE
export SERVERS
export SERVICES
export TYPE
export NODE_HOME
export SETUP_COMMAND
export JSHOST
export SSH_USER
export SSH_PORT
export SSH_KEY
export SSH_USER
export SSH_PORT
export SSH_KEY
export -f log_message