Reputation: 621
I have an API which runs on an EC2 instance and connects to a MySQL db.
My goal is to set up a clone of this which I can use as a development platform. Currently everything I do is live.
Ideally I would have up to date data in the test verison of the MySQL database, so maybe a script to auto clone the live version to the test version every day would suffice?
I have a standalone .exe application which calls the API.
What is the typical development work flow here? I guess I will need a seperate folder on my server for my dev branch. Then I can call the dev url from my standalone application.
So during testing I would change the API url from "/live-api/login.php" to "/test-api/login.php" in my standalone program. I would have the /live-api folder and the /test-api folder hooked up to to the same repo, where the /test-api is always on the dev branch and /live-api is always on master branch?
Thanks!
Upvotes: 2
Views: 324
Reputation: 10876
Your architecture looks good.. You have two folder [ if u are on tomcat two webapps] which come from different branches.
Regarding test db getting updated with production db; it looks tricky. Do you want to have independent RDS for your test environment ? One option is that at night anyway you would have configured to take a snapshot [backup] of your production db.. You can re-create your test RDS db with this new snapshot.. Only drawback would be that any test data created on your test environment will get lost daily..
Upvotes: 2