-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathperform_app_init.sh
More file actions
executable file
·35 lines (32 loc) · 967 Bytes
/
perform_app_init.sh
File metadata and controls
executable file
·35 lines (32 loc) · 967 Bytes
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
#!/bin/sh
# Perorm app init, set ip address during build time
PUBLIC_IP_ADDR=$(curl ipinfo.io/ip)
RANDOM_NAME=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13 ; echo '')
echo """
[
{
\"name\": \"node-app\",
\"script\": \"app.js\",
\"log_date_format\": \"YYYY-MM-DD HH:mm Z\",
\"merge_logs\": false,
\"watch\": false,
\"max_restarts\": 10000,
\"exec_interpreter\": \"node\",
\"exec_mode\": \"fork_mode\",
\"max_memory_restart\": \"800M\",
\"error_file\": \"/dev/null\",
\"out_file\": \"/dev/null\",
\"env\": {
\"NODE_ENV\": \"production\",
\"RPC_HOST\": \"$PUBLIC_IP_ADDR\",
\"RPC_PORT\": \"8545\",
\"LISTENING_PORT\": \"30303\",
\"INSTANCE_NAME\": \"$RANDOM_NAME\",
\"CONTACT_DETAILS\": \"https://www.jellypool.xyz\",
\"WS_SERVER\": \"ws://meter-stats-server.nextblu.com:3030\",
\"WS_SECRET\": \"metermonitorsecret\",
\"VERBOSITY\": 2
}
}
]
""" >| app.json