[RAILS] [Docker] How to update using a container on Heroku and how to deal with Migrate Error

environment

macOS 10.15.5 Rails 5.2.4.2 Docker 19.03.12

How to update on Heroku

When deploying with Heroku in the Docker environment and then updating, execute the following command to update the contents of the Docker container.

terminal


#Log in
$ heroku container:login
#push
$ heroku container:push web
#Reflect at the end
$ heroku container:release web

This will update the contents of the Docker container deployed on Heroku!

If you get an error saying "ActiveRecord :: PendingMigrationError" ...

If there is no problem when reflecting it on the browser in the Docker environment, but a migration error occurs on Heroku ...

スクリーンショット 2020-10-09 18.48.11.png

In that case, you need to migrate separately on Heroku.

terminal


$ heroku run rails db:migrate

After that, if you reload Heroku without deploying it as it is, it will be displayed normally in the browser!

Recommended Posts

[Docker] How to update using a container on Heroku and how to deal with Migrate Error
How to build a Jenkins server with a Docker container on CentOS 7 of VirtualBox and access the Jenkins server from a local PC
How to redo a deployment on Heroku
How to build a Ruby on Rails environment using Docker (for Docker beginners)
Starting with installing Docker on EC2 and running Yellowfin in a container
How to build a Ruby on Rails development environment with Docker (Rails 6.x)
How to build a Ruby on Rails development environment with Docker (Rails 5.x)
How to start a Docker container with a volume mounted in a batch file
How to deploy a container on AWS Lambda
How to update pre-built files in docker container
Update container image with KUSANAGI Runs on Docker
[Laravel] How to deal with out of memory error when composer require [Docker]
How to deploy to Heroku from a local docker image
[Docker environment] How to deal with ActiveSupport :: MessageEncryptor :: InvalidMessage
How to convert A to a and a to A using AND and OR in Java
Common problems with WSL and how to deal with them
[Docker + Rails] How to deal with Rails server startup failure
Create a Java (Gradle) project with VS Code and develop it on a Docker container
[Rails] [Docker] Copy and paste is OK! How to build a Rails development environment with Docker
[Docker] How to see the contents of Volumes. Start a container with root privileges.
How to quit Docker for Mac and build a Docker development environment with Ubuntu + Vagrant
Create a Java (Maven) project with VS Code and develop it on a Docker container
How to deploy on heroku
How to update with activerecord-import
How to deploy a simple Java Servlet app on Heroku
How to get inside a container running on AWS Fargate
How to deal with the error ERROR: While executing gem ... (Gem :: FilePermissionError)
Build a Node-RED environment with Docker to move and understand
Try Hello World using plain Java on a Docker container
How to join a table without using DBFlute and sql
How to get started with JDBC using PostgresSQL on MacOS
How to register as a customer with Square using Tomcat
How to deal with different versions of rbenv and Ruby
The story of pushing a Docker container to GitHub Package Registry and Docker Hub with GitHub Actions
How to develop in a container with --privileged and / sbin / init passed in VSCode Remote Containers
Solution for the error "no basic auth credentials" when pushing a Docker container to Heroku
With podman in docker, everyone wants to get along and use docker on a shared computer
Workspace setting location when connecting remotely with VS Code and working on a Docker container
[Rails / RSpec] How to deal with element has zero size error
How to deal with 405 Method Not Allowed error in Tomcat + JSP
How to run a mock server on Swagger-ui using stoplight/prism (using AWS/EC2/Docker)
[Java] How to update Java on Windows
How to make a Java container
How to run JavaFX on Docker
I was angry with proc_open (): fork failed when trying to composer update inside a Docker container
Create a flyway jar with maven and docker build (migrate) with docker-maven-plugin
How to connect Heroku and Sequel
How to run a job with docker login in AWS batch
Run PureScript on a Docker container
I tried deploying a Docker container on Lambda with Serverless Framework
DB error on deploying with Heroku
Deploy Rails on Docker to heroku
Update MySQL from 5.7 to 8.0 with Docker
How to build CloudStack using Docker
How to start Camunda with Docker
[Ruby on Rails] How to log in with only your name and password using the gem devise
I want to download a file on the Internet using Ruby and save it locally (with caution)
[Android] How to turn the Notification panel on and off using StatusBarManager
How to deploy to AWS using NUXTJS official S3 and CloudFront? With docker-compose
How to quickly create a reverse proxy that supports HTTPS with Docker
How to realize hybrid search using morphological analysis and Ngram with Solr