I want to deploy a simple web app to Heroku.
The front-end, back-end, and database of my web app are bundled together with docker-compose.
The Heroku documentation says that typing heroku container:push web should be sufficient to push my app to Heroku, once I have created the appropriate images with docker-compose. This doesn't work for me: the Keroku CLI tells me No images to push.
Adding a -a myAppName tag doesn't help either, nor do other posts on Stack Overflow.
I would prefer not to try this solution, as it would pollute my source control with Heroku-specific configuration.
What can I do to understand what is not working and why?
Docker compose on Heroku is just for local development. You should look at heroku.yml for deployment. Reference. Heoku.yml
Related
I want to deploy my project in production, but I can find information how to do it, I follow this information to created my website: rails+webpack, and just say for heroku but I am not using heroku.
I will really appreciate if you can help me with this issue.
You might not be understanding what Heroku is, you can easily use Heroku to deploy your website by following the steps mentioned in the same guide you posted. Using the command git push heroku master will deploy your application to a unique Heroku address which you can open by using heroku open in the CLI.
So first you'll need to create a Heroku account and then download the Heroku CLI which is just an interface to use Heroku from the command line. And here's a great guide on how to deploy a Rails 5 application to Heroku, Heroku might seem a bit scary at first for beginners but it really is very simple.
I'm interested in Docker as it creates a neat way of setting up an application environment.
EDIT : I'm on Digital Ocean Droplet created with their Docker 1 click Application.
Apparently there isn't a proper way to deploy a Rails application to production, or at least I haven't found it. The setup seems much more complicated then setting up the server from scratch and using Capistrano. I tried using Heroku but it doesn't entirely support Docker.
Is there any good guideline on how to setup Docker to deploy a simple Rails application on a production server?
I read/watched already this references:
The Quickstart: Docker Compose and Rails is ok for development, but then Using Compose in production is too rough and superficial.
The Docker for DevOps course: From development to pro
way too complex, but is the only that at the end tells you how to deploy Rails on Digital Ocean. Anyway there must be an easier way.
Deploying Your Docker Rails App
is just for Heroku.
Getting to know Centurion
does anyone use Centurion to deploy?
Docker + Capistrano = Warp Speed
a bit buggy and outdated.
Running multiple web applications on a Docker host with Apache
the right approach, shame is not for Rails..
So here what I did and the following output:
root#ubuntu-512mb-sfo1-01:/var/lib/dokku/plugins# dokku postgres:link DATABASE ubuntu-512mb-sfo1-01
2016/02/18 05:24:38 open /var/lib/dokku/plugins/available/pg-plugin/plugin.toml: no such file or directory
2016/02/18 05:24:38 open /var/lib/dokku/plugins/available/pg-plugin/plugin.toml: no such file or directory
no config vars for ubuntu-512mb-sfo1-01
Can someone help me? I try to deploy rails to digital ocean.
I use http://blog.flatironschool.com/using-digital-ocean-and-dokku-for-easier-rails-app-deploys/ - this tutorial but it seems to be horribly outdated. I ran into so many errors so I am thinking of giving this up and staying with heroku hosting.
It means that you don't have a Postgres docker container active. Take a look at the dokku-pg-pluging to know how to configure and instantiate a postgres docker container.
By the way, since your objective is to change from Heroku to DigitalOcean, and you're having trouble using dokku, may I suggest you using deploy bot instead? I did managed to successfully deploy an rails 4 app to DigitalOcean using deploy bot. Follow this tutorial. And you can easily follow this guide with deploy bot, adapting the unicorn and nginx stop/start services with the hooks that deploy bot provides.
Edit:
Since you wanted a more specific answer for the deploy bot solution, here goes my approach (this was +/- 3/4 months ago):
Create the droplet and follow the guide to create a droplet, install ruby, rails, unicorn and nginx and the script to control unicorn (it's in the tutorial).
Configure the deploy bot and make sure you run bundle install and another rails' specific commands (changing environments and so on) after the upload (this is a predefined hook).
The last command should be service nginx restart to restart the server (using the script from step 1).
Profit!
I am trying to deploy a Rails application online. My host right now is dream host. Although i am not to sure how to deploy my apps. At the moment i am on a shared server, but i am considering upgrading to a VPS, but the questions remains! Do i need Git hub or not. If i need to have git hub to make it private do i have to pay or an alternative exist.
What I meant by not to sure on how to deploy rails is that I have a localhost provided with webrick and with database.yml settup otherwise everything else is dark for me.
You can use capistrano to deploy you application to shared host or VPS via SSH.
https://help.github.com/articles/deploying-with-capistrano.
I'm new to Heroku and Ruby on Rails and this may seem trivial. But I could not find the answer.
The Google App Engine has a web server application that emulates all of the App Engine services on local computer. Does Heroku have something similar?
Basically I want to run/debug RoR app on local machine before pushing it to Heroku.
If you are on the Cedar stack, there is a local utility called foreman that can read your procfile to simulate how it will run on Heroku. More info about it is on Dev Center here:
https://devcenter.heroku.com/articles/procfile#developing-locally-with-foreman
Heroku CLI has the local command to run your app locally. Without options, it will run the processes defined in the Procfile in the app root, using any environment variables defined in .env:
heroku local
For configuration options such as using different paths for .env and Procfile and local subcommands see: https://devcenter.heroku.com/articles/heroku-local
I use http://pow.cx/ and https://github.com/Rodreegez/powder for that. Is not emulating Heroku, but it allows you to set up a 'production' environment quickly.
Also, check http://devcenter.heroku.com/articles/multiple-environments and consider if you need a staging deploy.
Nothing like that exists for Heroku but to be honest you don't really need it. Develop locally, use Ruby 1.9.2 as that's the heroku default these days - keep in mind the constraints of Heroku http://devcenter.heroku.com/categories/platform-constraints. Use Postgres locally since that is what heroku shared DB is and you'll be off to a good start.