This is an interactive video chat application that lets you explore the UCSD Library walk from the comfort of your home.
https://www.youtube.com/watch?v=zT_c2fCU5U8&t=243s
To run the application you will need Node.js and npm installed. Docker and docker-compose are only required if building for production. Start by cloning or downloading the repo to your machine.
git clone https://github.com/Triton-Talk/tritontalk.git
cd tritontalk
After cloning, run the following command:
./setup.sh
This will download all the required dependencies.
Run
./development.sh
On first run, this will take some time to start, so be patient as it build the preliminary containers. Subsequent runs will be much faster, and the containers can be left running for as long as necessary (cannot do this natively)
To see logs, run
./logs.sh
It will show the 15 most recent logs and then attach to the containers so you can see live logging. To disconnect, press at any time. This will not close the containers.
To bring the containers offline, use Docker's kill command to close the containers.
docker kill tttvlw-nginx-development tttvlw-backend-development tttvlw-frontend-development
You will need two terminal windows open, in addition to wherever you are developing. This should only be used if you cannot install Docker for some reason.
In the first window, do the following:
cd backend
npm install
npm run dev
In the second window, do the following:
cd client
npm install
npm run dev
Run the following commands:
./setup.sh
./production.sh
This will emulate a production build with NGINX proxying to the node.js backend and serving the front-end statically. It does not support hot-reloading. Use this only to test before pushing master.
Create a .env
file in the backend/
directory.
You will need your Twilio Account SID, API Key and API secret.
The Account SID is available in your Twilio console.
Add it to your .env
file.
The API Key and API Secret can be created under Programmable Video Tools in your console.
Create a key pair and add them to the .env
file too.
Next, you will need to set up a Mongo database. Put username, password, and host for the database in the .env
file.
Finally, set up a Firebase project and give it Authentication services. Keys for this will also need to go in the .env
file.
To deploy, you will need to first merge your changes to master and push to the GitHub. Following this, run
./build_react.sh
Upon prompting, press 'y' to copy your changes to the production server.
DockerHub automatically builds the backend from the 'master' branch of the tritontalk.git GitHub Repo.
SSH into the tritontalk.com server. There should be a new folder at the ~/ directory called build_{USERNAME} where USERNAME is your username. Remove the old build/ folder and rename this folder to build/. Then run the following script
sudo ./stopPullStartCopyBuild.sh
It must be run with sudo.
The server should now be up to date.