Free tool for the creation of fully customizable 3D virtual tours using Three.js through React Three Fiber.
To test the application online, head to https://openvirtualtours.org/admin and login with the following credentials:
email: [email protected]
password: password
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;
- Docker and docker-compose installed on your local machine.
- A minimum of 8GB of disk space and 4GB of RAM.
- Clone or download and extract this repo on your local machine.
- Navigate to the project directory and run
sudo docker compose -f compose-dev.yaml up --build
. - Test the application by heading to http://localhost:3000/.
- Test the API by sending requests to http://localhost:4000/.
To enable hot-reload, install Docker Desktop on your local machine and use the Dev Containers extension.
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;
- 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.
- Fork or download and import this repo to generate a new copy under your own ownership.
- Replace the SSL certificates in frontend/nginx/certs and the .env and frontend/.env data with your own.
- 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.
- Test the application by heading to the root of your public DNS address.
- Test the API by creating your own production environment on Postman and setting api_root to your public DNS address.
Clone your new repo on your local machine and follow the local install instructions.
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.
$ sudo su
$ cd /var/lib/docker/volumes/<my_volume>
$ sudo docker ps
$ sudo docker exec -it <container_id> bash
$ sudo docker ps
$ sudo docker logs <container_id>