Skip to content

HOSTING

FabiKogWi edited this page Jul 4, 2024 · 6 revisions

Installing HISV on a publicly accessible server

(This was tested using Ubuntu 22.04)

sudo apt update

#install node
sudo apt install nodejs
# check if installation was successful 
node -v
# installing npm
sudo apt install npm

#installing yarn
npm install --global yarn

# check if installation was successful 
yarn --version

# get latest version of repo
git clone git@github.com:cgtuebingen/hyperrealistic_indoor_streetview.git

cd hyperrealistic_indoor_streetview

# this will start the server, by default using port 3000
yarn build && yarn start

Install with Github Actions updates

What does Github Actions do?

If there is a push or merge on main Github Actions automatically updates the server and restarts it with the new updates.

How to enable

  • If tmux is not installed on your server either install it or update updateWebsite script accordingly
  • Create sudo ssh useraccount named ghactions
  • Create ssh keypair
  • Create .ssh folder in ghactions folder. There create an authorized_keys file
  • Add public key to authorized_keys
  • Save private key as PRIVATEKEY<Your name> on Github secrets
  • Add your ip as HOST<Your name> on Github secrets
  • Copy updateWebsite.yml file and rename it as updateWebsite<Your name>.yml
  • In your new .yml file replace all instances of secrets.HOST and secrets.PRIVATEKEY with your secrets
  • Install for the first time as above in the ghactions folder
  • Enjoy automatic updates to your server :)

Known Problems

If there is a problem with the ssh connection failing, make sure to set the right permission for ghactions user in the ghactions folder and the .ssh folder by setting them to:

chmod /home/ghactions 755
chmod /home/ghactions/.ssh 644

Using Dockerfile

A dockerimage exists under fabiuni/teamprojekt. It is currently pretty large (around 800MB) so be prepared for a bit of a download. If it is not up to date, either write me or create your own like below.

  • If you have docker installed, use docker run -dp:3000:3000 fabiuni/teamprojekt

Creating your own dockerimage of the project

  • If you don't have docker installed, install docker
  • clone the git repo to your machine
  • Make sure there are no splats in the public folder
  • Use docker build <your image-name> in the project directory to build the image
  • Replace the name of the dockerimage in the docker compose file with your imagename
  • Place the docker-compose.yml in any directory that contains a folder called public that contains your splats and docker-compose up to start the container with your splats