-
Notifications
You must be signed in to change notification settings - Fork 1
HOSTING
FabiKogWi edited this page Jul 4, 2024
·
6 revisions
(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 [email protected]:cgtuebingen/hyperrealistic_indoor_streetview.git
cd hyperrealistic_indoor_streetview
# this will start the server, by default using port 3000
yarn build && yarn start
If there is a push or merge on main Github Actions automatically updates the server and restarts it with the new updates.
- 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 asupdateWebsite<Your name>.yml
- In your new .yml file replace all instances of
secrets.HOST
andsecrets.PRIVATEKEY
with your secrets - Install for the first time as above in the ghactions folder
- Enjoy automatic updates to your server :)
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
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
- 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