I have an app created in Django and React, but there are few problems that I am facing mainly :-
-
As I will have a large database(postgres) exclusily for a single user, I am creating different AWS instance(t2.micro) for every user. (we are a startup so economical to use t2.micro)
-
Whenever there is a new user then I have to go and manually install postgres, setup nginx and other important things and this is just for Django in EC2, I am not even talking about React in S3.
Solutions I am looking for :-
- If there is a way to automatically create an AWS EC2 instance and deploy backend also same thing for AWS S3 and deploy frontend, whenever there is a new user.
- There are a lot of things that I will be running when the backend starts namely Huey, Installing Postgres and Creating User for it, installing Redis, making migrations and other trivial stuff. Is there a way to automate every single thing?
Things to consider :-
We are a startup and can not depend on paid services really much.
Please do not ask me to use a single server for every user as we are
using 3rd party apis to get data and will face problems if there are
more users requesting from same IP, also it puts a lot of load on
the RAM.
Any suggestion would be greatly appreciated.
3
Answers
BTW This is the helper script I wrote if someone wanted to know -
You can do everything you need by:
I used travis for merges into master branch it redeploys your code whenever your master branch changes but I exactly don’t know they have an options you want, I recommend you to examine that site they may have a solution for you.