jon-myers / idtp

An Interactive Digital Transcription Platform for Hindustani Music
https://swara.studio
2 stars 1 forks source link

Test Server #418

Open jon-myers opened 4 months ago

jon-myers commented 4 months ago

We need a way of testing out changes to server code that won't actually change the live site. I spoke with my brother about it.

The best situation (money not being an issue) would be to have a second droplet altogether, running on something like test.swara.studio, doing operations on different copy of all data. Would probably need to have a clone of the mongodb database as well. We could get a less expensive version of the droplet, if we don't care about processing large audio. (thats the majority of the cost, as well as the storage space).

It may still be an improvement to just implement something on the same droplet, using Nginx to redirect to the other server file. This risks creating bad data / screwing up data that is used on the real site.

jon-myers commented 4 months ago

I think the most cost effective way to do this would be to spin up a full copy of the server, configure it to a) be pointed to by test.swara.studio b) point to a different mongoDB free db. (this would happen in the test server.js file) c) once set up, assign it a floating IP, d) This way, we can take a snapshot of it and destroy the server, so that when we create a new server, can just assign the floating IP to the new version.

jon-myers commented 4 months ago

Actually, we prob don't need all the data. Can just have one user and upload a few recordings just for testing. Would save a good amount of $, especially if we don't need the extra RAM: i.e. no longer recordings