I would like to ask you a question about deploying a rails application onto a physical server.
Briefly, our dinosaur client doesn't want to store anything on the cloud hence he wants us to deploy everything onto his servers instead of heroku.
What should be the most efficient way to solve this problem? Won't he be able to reach the source code of our application?
That would be great if you can help me,
Thanks!
You might think on the variant when you keep only production database (and assets if client want) on the client's server and deploy your code to Heroku or whatever else.
Related
I have developed an application with Laravel5.1. Now I need hosting suggestion for deploying my application. I know it's a silly question but I want a reliable answer. Before buying a hosting I want to know which hosting service will provide proper environment to run a laravel5.1 application.
Php version required >= 5.5.9
This is such a hard question to answer as it all depends on what you're after.
Some questions to consider:
Do you want to set the server up yourself?
If this is the case then any unmanaged provider will do the trick, you'll just need to set it all up; LAMP, Git, Composer etc.
Do you want to manage the server itself but you aren't sure how to set it up?
Digital Ocean (and other providers I'm sure) offer one-click apps where you can deploy whatever you want. For Laravel you would probably want to pick the LAMP app install. These deploy all the packages you will require and set them up for you so that you don't need to - the rest of the server management would be up to you from there.
Do you want to use Managed Hosting where they do it all for you?
OVH have been pretty good for me in the past, I've never used their managed option, although I know they have it - and I've had great service from them too.
If you're still not sure then I would suggest looking for a provider that provides servers that come with a LAMP stack (as this covers everything you need for Laravel) or one that supports PHP applications - if you're not sure then just contact the company and ask. Or find someone (a friend or a professional) who can help you get started online.
One suggestion because you are using Laravel is to look at https://forge.laravel.com/ where you can handle servers that runs in Digital Ocean and other providers.
Fits perfectly for Laravel.
I'm a little confused with how deployment of an application works.
I've been looking up tutorials and numerous times it is suggested that it goes live with DigitalOcean, Heroku or something similar, but some are monthly payment services (albeit not a large amount).
I resell hosting to my clients when I build websites for them so I manage everything on my side. My question is: is there a way to deploy a Rails app to my own web hosting space rather than having to use a third-party service? Have I missed something in the documentation?
I'm certain that my hosting can support everything that's needed. If anyone could explain how or why not I'd really appreciate it :-)
You can set up the stack on your own server without problems. When you are using apache or nginx, the easiest might be to use passenger for serving your rails application.
You just need to make sure you have the right ruby version and bundler installed. Services like DO are just simpler to work with as they already do all the needed server setup and most of the configuration for you.
I am new to ruby on rails deployment. I have created my first simple ruby on rails application, but I am struggling to properly get it onto my server.
In my research, I learned about the various ways to deploy a ror app to my own server, and it seems that using capistrano would be the way to do it. However, it is not clear to me how to use capistrano to launch my app.
What are the steps that I need to take in order to launch my app? Do I need to use git, I prefer not to.. I don't want to use Heroku.
It just seems that deploying the application should be really easy and I am struggling with it. If I am using the non-optimal tools let me know.
thanks
Capistrano is primarily used to deploy apps, not to launch them. Capistrano is of course capable of launching Rails apps, but how to do that depends on how your app is set up.
You should do some research on using nginx (HTTP server) and Unicorn (Rack server) together with Capistrano. It might take some time setting everything up, but once in working condition, they’ll make deploying your app close to enjoyable.
Regarding actually deploying your app: Heroku is not required in order to use Git, but if you really don’t want to use any kind of versions system (though I highly recommend that you do), this blog post might help you on your way: http://www.maxkpage.com/blog/capistrano-rails-deploy-without-svn-or-git/
So I host with company X and have my domain on there. I deployed my app to heroku and pointed my domain at it. I can't wrap my head around if I am hosting my site on heroku now or if I am hosting it on company X's servers.
I would assume I'm hosting on herokus server because that is the most logical, but just keep having this brainfart.
Could someone please explain this to me?
Your application is on Heroku's server. All company X has done is perform the DNS magic necessary to map the friendly URL (www.yoursite.com) to your Heroku deployment.
Amazon
You should also be aware that Heroku doesn't actually "store" the app on its own servers - it uses Amazon's ec2 cloud to create instances of your app
So although you have your domain with company X, your app handled through heroku, it will actually be running in one of Amazon's data centers
Keep that in mind when you start to grow (you may find benefits of using Amazon directly)
I've been playing around with a rails app and showing the customer the updates by deploying it on heroku. Now the customer wants it set up on their on server...as a live site.
Heroku made deploying rails app so simple that I can not wrap my head around starting from scratch on a server.
To the experienced rails developers, what all is required to do this? My app uses postgresql and the server is a linux server. The customer claims that they have installed rails on the server.
Do I just have to install postgresql...create the DB...run migrations and voila? or is there other stuff involved as well. Up till now I was working with development section of database.yml...now it will pick up production?
Please give some pointers and/or links that explain the process.
I think capistrano web page has a decent how-to tutorial on where to start from.
Well, think about this: what does a rails app need?
Ruby
Rails (the version you used for your app!)
Ruby gems you use
Rails plugins you use
A database with proper login/password access
If you use the RAILS_ENV environment variable, and set it to production, you won't have to worry about it for the next steps, otherwise REMEMBER TO DO THIS FOR THE PRODUCTION ENVIRONMENT!
You can use rake db:schema:load to set up the database, and then.. Well, make sure it loads at startup automatically, make sure you have whatever preloaded data you need, make sure it's accessible from the outside, or from wherever it needs to be accessed.
I don't know if there is anything else you need for the rails app -- but of course, Capistrano is a good idea, to help you maintain the app :)
You probably need to decide which server software you're going to use first, because that's not something that Heroku give you a decision about. Anyway, it's easy because Phusion Passenger is the default choice in the Rails world now. Passenger is easy to set up—it has probably the best command-line setup program I've ever seen—and the documentation is excellent.
Slicehost have a whole series of articles that cover setting up the various bits you need for various flavours of Linux. They really are excellent:
http://articles.slicehost.com/search?q=rails
You'll also need to learn how to use Capistrano, which is what most people use for deploying Rails apps.
Is there a reason why you can't use Heroku as your production environment?
Edit:
If they're running a php webserver the chances are they already have a functioning apache server. If this is the case you should look in to installing passenger and setting up a new database.
At this point you can either copy up your application yourself, run your rake tasks to get everything setup and then sit back and relax, or you can spend the time to learn how to use capistrano so you can repeatably deploy your application.
I suggest the latter... capistrano really isn't that tricky and assuming your application set up is relatively sane the defaults should get you 90% of the way there.