Project 1 โ€บ 12 Deploy to RenderGitHub โ†—
๐Ÿค– AI Prompt โ€” stuck? paste this

โ€œWalk me through deploying a Dockerized web service to Render's free tier using 'Deploy from Dockerfile', connected to my GitHub repo.โ€

12 โ€” [Optional] Deploy to Render

Category: Hosting & Deploy ยท Priority: Low ยท Optional

Use the free-tier Web Service. Select "Deploy from Dockerfile" โ€” Render auto-detects the Dockerfile.

โš ๏ธ OPTIONAL โ€” This task is only needed if you want to deploy your app to the internet. The core project works 100% locally without this.

๐ŸŽฏ What is this task?

Render is a hosting platform that can run your Docker container for free. You connect your GitHub repo, point it at your Dockerfile, and Render handles the rest โ€” no servers to manage.

๐Ÿ“‹ Step-by-step

Step 1 โ€” Push your code to GitHub first

If you haven't already:

# In your project folder
git init
git add .
git commit -m "Initial commit"

Then create a new repo on github.com and follow their instructions to push.

โš ๏ธ Make sure .env is in your .gitignore before pushing!

Step 2 โ€” Create a Render account

Go to https://render.com and sign up (free). Connect your GitHub account when asked.

Step 3 โ€” Create a new Web Service

  1. Click "New +" โ†’ "Web Service"
  2. Select your GitHub repo
  3. Under "Environment", select Docker
  4. Render will auto-detect your Dockerfile

Step 4 โ€” Configure the service

  • Name: my-docker-app
  • Region: pick closest to you
  • Branch: main
  • Instance Type: Free

Click "Create Web Service".

Step 5 โ€” Watch the deploy

Render will pull your code, build the Docker image, and start the container. This takes 2โ€“5 minutes. Watch the deploy logs for any errors.

โœ… Done when

  • Code is pushed to GitHub (without .env)
  • Render Web Service created and linked to repo
  • Deploy completes without errors
  • Render provides a public URL ending in .onrender.com

๐Ÿ“ Quiz

Answer all 1 questions correctly to complete this lesson.

1. How does Render run your app in this lesson?
โ† PreviousPass the quiz to completeNext โ†’