In this repo you will find a NextJS Application with a Docker Container that is part of an Automatic Workflow that shows how to Deploy correctly to Heroku Database your web-app following the following requirements:
-
Create a repository for a web-application using NextJS.
-
Then make a Dockerfile with its configuration
-
Add a pipeline to the project that should follow the steps Lint, Test, Coverage, Build & Deploy respectively with Github Actions.
-
Deploy project to Heroku Database after it passes all the test and requirements.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
Below you can see a CI/CD Pipeline Draft of the internal behavior.
-
Create your NextJs App.
npx create-next-app nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/master/basics/learn-starter"
-
Create and Config
Dockerfile
in your Web app. -
Create a Heroku Database and save you HEROKU_API_KEY in the section Secrets of your github account.
-
Create a folder
.github
and inside create your Yaml.file -
Config your yaml.file with the correct command line arguments of testing, linters, and coverage of your current application.
-
Make a push to the production branch=main to see results.
-
If everything went right now your project has been Dockerized and Deployed correctly to Heroku.