Build server Go script on machine

pull/242/head
kompotkot 2021-09-08 11:23:22 +00:00
rodzic bf8a3ebb09
commit 853fe39a20
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -3,9 +3,16 @@
# Deployment script - intended to run on Moonstream database server
# Main
APP_DIR="${APP_DIR:-/home/ubuntu/moonstream}"
APP_DB_SERVER_DIR="${APP_DIR}/db/server"
SCRIPT_DIR="$(realpath $(dirname $0))"
SERVICE_FILE="${SCRIPT_DIR}/moonstreamdb.service"
echo
echo
echo "Building executable database server script with Go"
/usr/local/go/bin/go build -o "${APP_DB_SERVER_DIR}/moonstreamdb" "${APP_DB_SERVER_DIR}/main.go"
echo
echo
echo "Replacing existing moonstreamdb service definition with ${SERVICE_FILE}"