Skip to content

CarlaCGDM/open-virtual-tours

Repository files navigation

Open Virtual Tours

Free tool for the creation of fully customizable 3D virtual tours using Three.js through React Three Fiber.

Features

Test online

To test the application online, head to https://openvirtualtours.org/admin and login with the following credentials:

email: [email protected]

password: password

Local install

Follow these steps to run a copy of this repo on your local machine in a development environment. Work on dev branch and merge into main when you are ready to push the changes to production.

graph TD;
    ReactApp--> |Dockerfile dev-stage| DockerCompose;
    NodeJSServer--> |Dockerfile dev-stage| DockerCompose;
    DBVolume-->MongoDB;
    MongoDB--> |Dockerfile| DockerCompose;
    DockerCompose--> |sudo docker compose -f compose-dev.yaml up --build| LocalMachine;
Loading

Local requirements

  • Docker and docker-compose installed on your local machine.
  • A minimum of 8GB of disk space and 4GB of RAM.

Local steps

  1. Clone or download and extract this repo on your local machine.
  2. Navigate to the project directory and run sudo docker compose -f compose-dev.yaml up --build.
  3. Test the application by heading to http://localhost:3000/.
  4. Test the API by sending requests to http://localhost:4000/.

Run In Postman

Development environment

To enable hot-reload, install Docker Desktop on your local machine and use the Dev Containers extension.

Cloud deployment

Follow these steps to generate and deploy your own fully-customizable version of the 3D virtual tour in a production environment.

graph TD;
    ReactApp--> |Dockerfile build-stage| NginxServer;
    SSLCertificate-->NginxServer;
    NginxServer--> |Dockerfile prod-stage| DockerCompose;
    NodeJSServer--> |Dockerfile prod-stage| DockerCompose;
    DBVolume-->MongoDB;
    MongoDB--> |Dockerfile| DockerCompose;
    DockerCompose--> |github actions runner| VPSInstance;
    StaticIP-->VPSInstance;
Loading

Cloud requirements

  • A VPS Linux machine with a static public IP and a public DNS address.
  • Docker and docker-compose installed on your VPS Linux machine.
  • A minimum of 8GB of disk space and 4GB of RAM.

👉 This repo has been tested and is currently deployed on an AWS EC2 Ubuntu t2.medium instance with 8GB of disk space.

Cloud steps

  1. Fork or download and import this repo to generate a new copy under your own ownership.
  2. Replace the SSL certificates in frontend/nginx/certs and the .env and frontend/.env data with your own.
  3. Access the terminal of your VPS machine and create a new self-hosted runner for your repo.

👉 To create a new self-hosted runner navigate to Settings → Code and automation → Actions → Runners on your repo and follow the instructions. You may need to run sudo chmod 777 actions-runner from the parent directory before you are allowed to run the configuration command.

👉 Once you're finished, run sudo ./svc.sh install and sudo ./svc.sh start to make the runner service persist on reboot.

  1. Test the application by heading to the root of your public DNS address.
  2. Test the API by creating your own production environment on Postman and setting api_root to your public DNS address.

Run In Postman

Development environment

Clone your new repo on your local machine and follow the local install instructions.

Troubleshooting

Everything should be up and running now. If you have any issues, you can see the data stored in your volume and the error logs of your containers through the following Docker commands.

See your volumes

$ sudo su
$ cd /var/lib/docker/volumes/<my_volume>

Container bash

$ sudo docker ps
$ sudo docker exec -it <container_id> bash

View error logs

$ sudo docker ps
$ sudo docker logs <container_id>

About

generating a docker image for the ovt frontend and backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages