Build
./gradlew shadowJarOutput is at build/libs/inceptionnotes-api-all.jar
Install following: https://www.arangodb.com/download-major/ubuntu/
echo '{"default":"en_US.UTF-8"}' > /var/lib/arangodb3/LANGUAGE
service arangodb3 restart
arangosh --server.username root --server.password root
arangosh> const users = require('@arangodb/users')
arangosh> users.save('inception', 'inception')
arangosh> db._createDatabase('inception')
arangosh> users.grantDatabase('inception', 'inception', 'rw')apt update
apt install certbot nginx default-jre python3-certbot-nginx-
Configure Nginx
-
Replace the contents of
/etc/nginx/sites-enabled/defaultwith the following
server {
server_name <insert server name here>;
listen 80;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
- Finally
certbot
certbot -t
service nginx restartCreate a script and run it.
#! /bin/bash
nohup java -jar *.jar > log.txt 2> errors.txt < /dev/null &