Correct approach to adding a wordpress site to an existing RoR site hosted on heroku - ruby-on-rails

Hello I have an app developed for a client of mine. This app is hosted on heroku on domain http://www.mydomain.com. Client has limited technical knowledge and wants a system that will easily allow him to add/edit content on some sites. Example: customer wants to create a news page and edit it, or he wants to create a blog posts..... The customer does not want to edit the main pages that i have already created for the app. So i was thinking of adding a wordpress site under http://www.mydomain/com/extras and this will be a fully managed wordpress site that my client can edit himself. Is this the correct approach? i researched and apparently it is not easy to host worpress on heroku. your recommendation is highly appreciated
thanks

Buildpacks
If you want to install Wordpress on Heroku, you'll need to use a custom buildback (typically this Wordpress buildpack)
As for running in a buried folder, I suppose it would work if you had the system set up correctly - you may need to create a custom buildpack to handle it all.
Some info for you:-
When you git push heroku, Heroku’s slug compiler prepares your code
for execution by the Heroku dyno manager. At the heart of the slug
compiler is a collection of scripts called a buildpack.
What you'll be looking for is how to create a buildpack to help your application deploy correctly. If you put your Wordpress blog in the following Rails folder, it should be accessible at least (whether it will run is another matter, as the paths might be inconsistent):
/public/path/to/your/blog
This will give you the ability to access the blog from the following URL: domain.com/path/to/your/blog
--
DNS
Another way to achieve this would be to host your Rails app on heroku, whilst deploying the Wordpress site in some shared hosting.
You could then "route" a subdomain, or perhaps a deep folder, with your DNS setup on your host - allowing you to send the traffic to different hosts without the users noticing

Related

Multiple Heroku apps on the same domain

I have a Ruby on Rails app hosted on Heroku and one of its paths must be connected to another Heroku app dedicated to a blog.
The objective is to use a path of the main website to reach the blog, keeping the original domain and avoiding the usage of different subdomains, this is a must due to SEO requirements.
Here the idea:
www.site.com -> app1
www.site.com/blog -> app2 (blog)
www.site.com/blog/articles/xxx -> article in app2 (blog)
Both the websites are developed in Ruby on Rails and hosted on Heroku. The path structure should be complete to be Google-friendly.
I've found some possible duplicates of this, but they are very old and related to deprecated plugins and gems not working at the moment:
How to run two different apps on the same domain using heroku
The first comment links to this article based on Docker Toolbox that is obsolete at the moment and also to routepath.app (broken link)
Multiple Heroku apps on a single domain
This suggests the usage of the gem "rack-reverse-proxy". The docs clearly says that is not for production systems, and it seems no longer maintained. This duplicate also links to this article, but it is a broken link.
Possible solutions:
Convert the 2nd application to a rails engine
Reverse proxy to the 2nd application
Configure the 1st application to have a 2nd database, using the database from the 2nd application as a read-only Rails Multiple Databases (I would choose this option)
The last option allows you to keep your 2nd application as-is for editing and whatever it already does. You can redirect production viewing to the 1st application.

How to make my rails app discoverable by search engine

I have my rails app deployed on heroku, I then bought a custom domain with a local web hosting service, how can I make my website indexed by google search engine, I have the indexing method suggested by google. but none of them worked, is it because I have pointed my custom domain to the Heroku one? any help will be appreciated.

Allow users to CNAME to custom subdomain on Heroku App

This may have been answered before (it seems relatively common) but for the life of me I cannot find it, so here we are.
I'm creating a relatively straightforward Ruby on Rails app and am (was?) planning on hosting it on Heroku since I'm already setup there.
The problem I'm having is that I'm creating a landing page builder that needs to allow users to view their website at something like https://their-app.my-app.com. Of course, there will be users who will also want to point their own domains (ex. their-app.com) to that subdomain via a CNAME.
1) Is it possible on Heroku to do that without having to add each one as a custom domain (which of course isn't realistic due to customers being able to add their own).
2) Any recommendations on which service might be the best for hosting this kind of setup? I really love the heroku PaaS setup but of course.. this is a requirement.
Side note: WHen doing it now (Creating a CNAME to point a domain name at the subdomain my app created) I currently get a Heroku page saying "No App Found at this Domain", etc.
Thanks!
Yes, this is doable and automatable on Heroku.
Using the Heroku Platform API, you can programmatically point domains to an app.
Then, your customer will have to point their domain to the value of the cname attribute provided by Heroku.

How to live Rails applications

I am new user for website developer(rails3.2) and I don't know how to hosting over website to live.
I have used heroku but over website is not searchable by google and heroku added there domain i.e. http://example.herokuapp.com but I want website with http://www.example.com.
Please suggest me what process I have to follow. Please explain step by step.
Need paid server
Heroku is a PaaS (Platform as a Service). There is no easier way to deploy application on the Cloud.
There are several domain configurations available to your app. Most simple is to add custom domains on Heroku heroku domains:add www.example.com and the next step, you must configure your application’s DNS to point to Heroku.
Becareful, DNS changes can take several minutes to several days to take effect.
You need to purchase a domain from any of the Domain provider(Go Daddy,Zerigo DNS).
And you need to point out your Heroku app configurations at Domain C-panel.
Here is an article at Heroku. have you checked it?
https://devcenter.heroku.com/articles/custom-domains
Also here are some few URL's that gives you some basic Idea.
https://devcenter.heroku.com/articles/zerigo_dns
How to configure heroku application DNS to Godaddy Domain?

service to use to host a app built using ruby on rails

What service should I use to host an app that I am building using ruby on rails. It would be a big plus if it could connect to Github and let you use your own domain name easily.
Thank you
Lots of options to choose from. Two of the most popular (and best supported, in my opinion) are Heroku and EngineYard.
Here are articles for each on how to use your own domain name with them:
https://devcenter.heroku.com/articles/custom-domains
https://support.cloud.engineyard.com/entries/21016458-Set-up-Domains-and-DNS
As far as linking to Github, each can be setup as a remote location for git, making deployment easy. Also, if you really want to allow to directly link you can find a how-to for EngineYard if you go to their site and search for "Link a GitHub Account to an Engine Yard Cloud Account" (I can't post the link because I don't have enough reputation points here yet to post more than two links).

Resources