^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A simple nodejs docker app containerized and deployed through heroku. In general, this process may vary in terms of various files and methods for deployment that you may have encounter through your studies. The app was original deployed without using my github repository. File preparations and deployment will vary depending on your preferable options. I'm sharing what I've learned while coming to the overall conclusion of which methods are helpful as well as a very basic understanding of how to use docker as efficient as possible. I would encourage anyone to further research topics that will help them achieve the results of the summary. Hope this beginner project helps someone else that's starting their web development/programmer journey.
Containerize a nodejs application, then deploy the application on a cloud server.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A very basic website with minimal CSS colors, nothing fancy.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
Create a Dockerfile // Instructions for container.
-
Build a docker image // Creating the instance for our container.
-
Run docker image //make sure image will run successfully.
-
Tag image // Tag image before you push. Specify the ending tag name of your image, or use the :latest tag.
-
Push image // Push to public or private docker hub repository.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Log into heroku.
heroku login
- Heroku create your app name.
Heroku create <appname-goes-here>
- Add your remote to heroku.
Heroku git:remote -a <appname-goes-here>
/////////////////////////////////////////////// .../Next
We use git to add, commit, and push file changes to Heroku.
git add.
git commit -m " Deploying <appname-goes-here> app to heroku. "
git push heroku master
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
resources:
- nodejs: Javascript run time for developing backend server applications.
- docker : Container management software.
- heroku: Cloud server
You can view the app live with the URL provided below.