I have been learning Ruby and Sinatra over the past couple months and I would like to get my app out in the wild. I am looking for suggestions for web hosts that support Sinatra apps and any details as to the actual process would be great as well.
I currently use hostmonster for a couple other sites. Hostmonster does support Rails applications. I would assume since Rails runs on Rack, hostmonster will also run Sinatra apps but I am not certain.
I haven't had much luck finding documentation on running Sinatra apps on hostmonster or any other web host outside of Heroku. Also, I haven't been able to figure out how to get my Sinatra app running by following through the Rails installation documentation provided by hostmonster.
You should be able to run on any app that works for Rack. The convention is to use the config.ru file. In there, instead of specifying how to load Rails, just specify how to load Sinatra.
Example config.ru
require File.dirname(__FILE__) + "/main"
run Sinatra::Application
Where "main" is the file that loads all the Sinatra stuff.
Related
I'm trying to deploy a webapp to Heroku. The current stack is build out of:
NextJS for the frontend (deployed on Vercel)
Strapi CMS (deployed on Heroku)
I would love to add a webshop to the webapp and would love to use the example from Vercel/commerce (https://github.com/vercel/commerce). I have selected Vendure as my favorite headless commerce provider.
I have a problem figuring out how to deploy Vendure on Heroku-platform. Is it possible to combine both Strapi and Vendure on only one Heroku app? Can both programs work together? I would think it's possible because both can work with PostgresDB.
I've read this documentation (https://www.vendure.io/docs/developer-guide/deployment/) but this doesn't speak about Heroku and the combination with Strapi.
I know my way with NextJS / Javascript / HTML, but my knowledge of the backend and deployment is not as good.
Thanks in advance for helping me out.
Greetings,
Bruno
You could take a look for inspiration/pointers at the vendure/vendure-demo repo, it is deployed using dokku, which is a nice FOSS heroku-like deployment app for your VPS or Server.
If you want, you could use it's Dockerfile for running it in heroku likewise or whatever dokcker compatible provider you might choose, just remove the -demo- parts you don't need about it.
I also have successfully deployed vendure and commerce with CapRover. Can recommend it a lot!
Which is like dokku but with a nicer webapp GUI/Installation. If you go the dokku route you have ledokku for a GUI too. Not so polished though.
I'm in the process of deploying my Rails app (it also uses redux, react, as well as some Ruby and Javascript). And I'm on the step in the official Heroku guide where it specifies to add a Procfile.
I assume that these are the commands that will run once the apps starts up; what exactly do I need to put in here for a Rails app that uses a database?
Locally, I know that to start my app I run rails s, as well as setting up the database beforehand; do I need to do something like that in the Procfile?
I am making a API project on OpenShift, which has a Node.js server and Ruby backend. I have set up a deployment for Node.js to handle API requests and a MongoDB deployment to store the data, but I'm having trouble with the Ruby backend.
The Ruby backend is responsible for updating the database every so often and thus must run at a regular interval or constantly. That's find, the issue is that OpenShift seems to want me to use Rack to start a web server, but that's not what I want. I just want the Ruby to run as a daemon and scrape the web to update the API every, say, 15 minutes.
How can I use Ruby without making a webserver- that is, get around the errors about not having Rack gem installed?
Is it possible to configure multiple web-server to an app-server in heroku? Playing with heroku, I don't see that is possible. Heroku deployment as I understand doesn't support web and app server separation. Just wanted to double check my understanding.
Appreciate your thoughts on this!
Heroku as things stand today, does not have a web-server option. You got to keep this in mind for some of your app configurations like cacheing, response compressing etc.
In the case of rails or node platforms, you got to set app-level configurations or have middlewares to take care of these kind of things.
I have a Ruby script that I want to run every few minutes using Google App Engine. I don't want to run a web service, just that script. Any ideas how to do that with JRuby?
Checkout cron support on GAE:
http://code.google.com/appengine/docs/java/config/cron.html
Not sure what you mean by "don't want to run a web service," but this is the way to do it on GAE.