- Create a public GitHub repository
- Share repository
- Install Node.js and use Express.js to create a simple web app
- Write a Dockerfile that builds and runs the app (description below)
- Make sure Dockerfile is hosted in the repository
- Create GitHub Actions Workflow that:
- Builds the app's Docker image
- Verifies the app functionality using apprentice-action (refer to pdf)
- Pushes image to Docker Hub
- Deploy the app to a cloud platform using the image from Docker Hub
- Extra Credit
- Add GitHub Workflow to automatically deploy the app when changes are made to the main branch
- Add a field to the JSON output of the app and verify the change is deployed
How to build and run the Dockerfile While in the directory of the Dockerfile:
docker build . -t myimage
docker run -d -p 80:80 --name mycontainer myimage
To stop the container:
docker container stop mycontainer
This application was deployed on Google Cloud Platform using the Compute Engine
Link to Google Run instance
Each successful build, test, and deploy will result in a new "unique_id".