Using 2 droplets for dev/staging and for production.

I’m about to get my first Digital Ocean droplet, but I have a few questions. Thanks in advance for your answers, this forums seems really great.

I’d like to have one droplet that will have a git server, MySQL database, and possibly staging environment.

Later when I’m ready to deploy my Rails app I’ll get another droplet just for Rails/NGINX/Passenger, etc. which will be the production environment.

Specific questions:

  1. I have only one domain name, which will be for the production droplet, so how do I communicate with the dev/staging droplet? Does Digital Ocean give me a unique IP for the dev/staging droplet?

  2. If DO does give me a static IP for my dev/staging droplet, how do I get my Rails app (on production droplet) to use the MySql database that is on the dev/staging droplet?

  3. Can I use Phusion Passenger to deploy to both the dev/staging droplet and to the production droplet?

  4. If I only have one domain name (for the production droplet), how will I access my Rails app deployed on the dev/staging server? Do I use some path that includes the DO provided static IP?

Sorry if this is a bit of a NOOB question, but I’m excited to have found Digital Ocean, and want to see if I can do what I’m hoping for. Thanks!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

  1. Each droplet comes with a static dedicated IP address. <br>2) You can configure your app to connect to mysql on a specific IP (which would be the mysql droplet’s IP in your case) instead of localhost <br>3) Yes, you should be able to use Phusion Passenger without any problems. <br>4) You can access it directly by its IP. You can also create a dns record for to point to your dev box.

to answer the first question, each droplet has a unique ip adress. and if u want you can have a subdomain go to one droplet and then the www and the no sub domain go to another i believe