Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I would like to discuss about AngularJS and Ruby on Rails working together and deployed in AWS (Amazon Web Services).

So far, I have a development environment with an AngularJS frontend that sends request to a Ruby on Rails API backend. These both are two separate applications (they are in separated git repositories).

The AngularJS app is running in a Node.js server listening on one port, and Rails is running in a Webrick server listening on another port.

Although they work together, AngularJS is not physically integrated in the RoR app.

Now its time to deploy in production environment. For that, I will use an EC2 AWS instance (currently deploying using Elastic Beanstalk). As far as I understand, I can't have the same architecture here.

I would like to know your suggestions this point. Do you see any advantages or disadvantages?

Should I update my development environment, so the AngularJS app is integrated inside the RoR application (and deploy just one application)?

This is something I don't like, because I guess I have to modify many things.

On the other hand, is it possible to run both applications separately, the same way I do in development?

Can I install a node.js and a Unicorn or whichever server manually in production in the same instance?

share|improve this question
    
Can you explain why you can't have the same architecture on AWS? Is it because you can't run two servers? There's nothing on the AWS side that would prevent this from happening. In fact, my current job deploys nearly identical to this on AWS (our front end is hosted on on their CloudFront, though). –  Jason L. 23 hours ago
    
Hi Jason, I dont say it is not possible. The only problem is Im new with AWS, so, so far I only know how to deploy with Elastic Beanstalk. With EB I dont know how to do it if possible. I think in order to have this architechture I should create an EC2 instance and install the servers manually. Is it right? How should I do it? –  Rober 22 hours ago
    
we have trying to install node js on elastic beanstalk but no success almost the same requirement like you AngularJS app is running in a Node.js and backend on php. We have try to use .ebextension to install node js but still have limitation and issue to we decided to do manually. My Suggest is go manually for this setup. Any other thing you need to know about AWS elastic beanstalk let me know –  abaid778 21 hours ago
    
@Rober I'm not really an ops guy, so I wouldn't know how to setup EC2.. at least not the specifics of it. You're going to need two servers (or, even just 1 if you wanna run these apps on separate ports), one configured for node and one for Rails. I know their OpsWork stuff makes things like deploying Rails and Node really simple. From there you'd just configure the Node server to point to the Rails server. –  Jason L. 20 hours ago
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.