- Crochet Shop Website: https://crochet-shop-website-1057035447975.us-central1.run.app
- The links in the navigation bar works and goes to their respective pages
- Pokemon Mystery Dungeon Website: https://flask-pkmn-md-site-1057035447975.us-central1.run.app
- The "Learn More" button works and goes to the games' respective Bulbapedia pages
- Crochet Shop Website: https://crochet-shop-website.greentree-09dfd09f.centralus.azurecontainerapps.io/
- Pokemon Mystery Dungeon Website: https://flask-pkmn-md-site.greentree-09dfd09f.centralus.azurecontainerapps.io/
- Crochet Shop Website
- The repo used for this was crochet_shop_docker. It contains files from a crochet shop website I made back then that was deployed at Render.com using gevent, gunicorn, and greenlet.
- Pokemon Mystery Dungeon Website
- Files from my Pokemon Mystery Dungeon Website repo was used
- Create docker repo
- Create a flask app in VSC
- In VSC terminal, ran the following cmds based on deployment_instructions.md:
- docker login -u dnce17
- docker build --platform linux/amd64 -t prac-docker:v1 .
- docker run -p 5000:5000 prac-docker:v1
- docker tag prac-docker:v1 dnce17/prac-docker:v1
- docker push dnce17/prac-docker:v1
- The Docker image should now be in Docker
- Go to Cloud Run
- Deploy a service container
- The following configs were used for my case
- Artifact Registry + Docker Hub --> checked
- Container image URL: docker.io/dnce17/prac-docker:v1
- Format: docker.io/(docker_username)/(name_of_docker_repo):(version)
- Authentication: Allow unauthenticated invocations
- Allows anyone to enter
- CPU allocation and pricing: CPU is only allocated during request processing
- Container(s), Volumes, Networking, Security
- Create the container
- Click the link generated after creation is finished to see if the app is running correctly
- After making edits to app, rerun the following, but just change the version (if previous was v1, now do v2):
- docker build --platform linux/amd64 -t prac-docker:v2 .
- docker tag prac-docker:v2 dnce17/prac-docker:v2
- docker push dnce17/prac-docker:v2
- In your GCP service container, click "Edit & Deploy New Revision"
- Change the container image URL to include the new version, then deploy
- After deployment, click the URL again to see if everything is correct
- Search and select "Container Apps" in the search results
- Click "Create," then "Container App"
- The below configs were used:
- Basics tab
- Container
- Ingress (**KEY step to ensure that an application URL is generated)
- Create the app, then go to the resource after creation is complete
- Click the link under the "Application URL" in the Overview page to check if deployment is successful
Since I created my Docker account with my GitHub account, I did not have a password to enter when I ran the "docker login -u dnce17" cmd. I was able to create a password for my Docker account by using the forget password link.
Another challenge was the "docker build" cmd not working. I was getting the following error: "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?" I could not find a solution on Google, so I used ChatGPT and found that I simply needed to open up Docker Desktop, which solved the issue.
On the other hand, deploying the application on both GCP and Azure was smoother than I thought. There was not much configurations to set and no issues with both cloud platforms in creating the service container and deploying the application. Docker seems like a good way for students to showcase their work if they ever develop personal projects and want to deploy them. For example, since GCP offers the option to allocate CPU only during request processing and gives users a certain amount of free request per month, students could possibly pay no cost at all, assuming their application does not generate too much traffic.