-
Notifications
You must be signed in to change notification settings - Fork 3
/
start-server
executable file
·23 lines (22 loc) · 1.17 KB
/
start-server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
useUpToThisAmountOfRAM=10G
if [ ! $# -eq 3 ]; then
echo "Start me with four parameters, e.g.:"
echo "./start-server /temp/RootDataFolder/ 192.168.3.123 9080"
echo
echo "1st param: Path to an existing folder under which datasets will be kept,"
echo " it is okay to re-use a folder populated from some previous session"
echo "2nd param: Host address to which the server will bind to, preferably numeric"
echo " IP of the outside network interface if the server shall be reachable"
echo " also from outside of this box, otherwise 'localhost' is fine too"
echo "3rd param: Port to which the main (24/7 controlling) server will bind to"
echo
echo "Note: Check your firewall settings..."
echo "Note: Currently the server will consume up to $useUpToThisAmountOfRAM of main memory,"
echo " edit this script if you want to change this number..."
else
java -Xmx${useUpToThisAmountOfRAM} -Dquarkus.datasource.jdbc.url="jdbc:h2:$1/h2;MODE=PostgreSQL;INIT=CREATE SCHEMA IF NOT EXISTS datastore" \
-Ddatastore.path=$1 \
-Dquarkus.http.host=$2 -Dquarkus.http.port=$3 \
-jar target/quarkus-app/quarkus-run.jar
fi