app300
v1.0.14
Published
Easily creating an application in under 5 minutes (or 300 seconds). Uses Vagrant and the AWS SDK to create and deploy a fully functioning application that is well architected, easily maintainable, and adheres to the twelve factor application.
Downloads
17
Maintainers
Readme
app300
Easily creating an application in under 5 minutes (or 300 seconds). Uses Vagrant and the AWS SDK to create and deploy a fully functioning application that is well architected, easily maintainable, and adheres to the twelve factor application.
Getting Started
Quick note: this project uses Vagrant to create an environment that closely matches an EC2 instance. The Vagrantfile defaults to an EC2 Nano, but you can easily switch between sizes in the Vagrantfile.
npm install app300 -g
mkdir MyProject
cd MyProject
app300
(finish the prompts, say Yes to all if you're starting out)
vagrant up
Viola! Navigate to http://192.168.33.10:3000 for your API, http://192.168.33.10:8080 for your App, and http://192.168.33.10:9090 for your RethinkDB administration page.
README is not completely fleshed out
There's a lot that's not here in this README yet. So until it's all fleshed out and if you've got any questions, hit me up on github. Thanks - HQ
Deploying onto AWS
Quick and dirty step by step on deploying onto your own EC2 instance in AWS.
- Sign into AWS console and navigate to your EC2 instances. Launch a new EC2 instance.
- Select Ubuntu Server 16.04 LTS (HVM), SSD Volume Type, 64-bit (ami-759bc50a). Select your desired size and capacity of instance. Select "Review and Launch", then "Edit security groups". If you're launching a non-SSL project (typically non production and testing in AWS, add ports 80, 3000, and 9090, in addition to the port 22). If you're launching a SSL project into production, just add port 443. (And hey, if you're a pro, do whatever you need to do here.)
- Press "Launch" and confirm your EC2's key pair. Then press "Launch Instances".
- Once you're EC2 instance is finished and shows as "running", follow the "Connect" instructions and SSH into your newly created EC2 instance.
- Your EC2 instance should already come with git installed, so go ahead and clone your project.
cd
into your project directory. sudo su
and then copy and paste the following commands to install your project and its framework dependencies:
cd _framework
bash ubuntu.sh
npm install
cd ..
cd database/_framework
bash install.sh
cd ../..
cd api/_framework
bash install.sh
cd ../..
cd app/_framework
bash install.sh
cd ../..
- As of right now, your database, api, and app are all now running! But we don't have our
.env
variables plugged in yet (because you shouldn't be committing them), and we haven't hardened our database yet. Let's harden our database first. - As
sudo su
and in the root of your project, runbash database/_framework/production.sh
. This locks down the admin interface and limits connections to only those tolocalhost
. Now if you're running your project between multiple EC2 instances, you'll want to modify your RethinkDB configuration manually, to allow the appropriate IP addresses for connection making. - Populate the
.env
variables in your database, api, app (and your project's_framework
directory if you're running both api and app on port 443). Thensudo su
andpm2 restart all
for your environment variables to take effect. - Now you're done! We'll streamline this process, but this will have to do for now.