Forked from nathanpanics/docker-heroku-deployment.md
Created
October 26, 2018 05:15
-
-
Save gambinish/66fc49ebc5fe52a1c7a19dc99df71326 to your computer and use it in GitHub Desktop.
Revisions
-
nathanpanics revised this gist
Oct 26, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -53,4 +53,4 @@ heroku container:rm <image name> ``` ## Resources [Heroku - Container Runtime & Registry](https://devcenter.heroku.com/articles/container-registry-and-runtime) -
nathanpanics created this gist
Oct 26, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,56 @@ # Deploying Docker-Compose Container to Heroku ## Requirements - [node.js](https://nodejs.org/en/) - [docker & docker-compose](https://docs.docker.com/compose/install/#prerequisites) - [heroku cli](https://devcenter.heroku.com/articles/getting-started-with-nodejs#set-up) - [compose-it](https://www.npmjs.com/package/compose-it) - [heroku account](https://signup.heroku.com/dc) ## Set Up Environment 1. Generate docker-compose react template ```bash npx compose-it -u <username> -d <project name> ``` 2. Test docker-compose locally. Check http://localhost:3000 ```bash docker-compose up ``` 3. (optional if already logged in) Log in to Heroku ```bash heroku container:login ``` ## Deployment ```bash # app name is optional, heroku will randomly pick a name if no name is given heroku create [app name] # build image and push to container registry heroku container:push <image name> # release the image to your app heroku container:release <image name> # open the app in your browser heroku open ``` ## Updating images ```bash heroku container:push <image name> ``` ## Removing images ```bash heroku container:rm <image name> ``` ## Resources [Container Runtime & Registry](https://devcenter.heroku.com/articles/container-registry-and-runtime)