All threads / How do I deploy a Rails API server to an Ubuntu 20.04 server using to nginx
Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I deploy a Rails API server to an Ubuntu 20.04 server using to nginx

Kiffin Gish asked in Rails

I have an Ionic Angular App which makes requests to a Rails Api server.

On my local development machine everything works fine. The Rails Api server is accessible via localhost:3000/api which the app makes calls to.

Now I want to deploy the app and the rails server to the same machine where my app runs on my-domain.com and calls to my-domain.com/api should be proxied to the rails api server.

Tried following instructions for passenger and capistrano but information is limited to "normal" rails apps and doesn't work for my situation where a front-end nodejs app and the rails api server are running on the same machine.

What is the proper procedure to follow?

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 68,099+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2022 GoRails, LLC. All rights reserved.