title | description |
---|---|
Render Deployment + Docker |
Welcome to our official documentation! |
- Sign up for Docker, or sign in to an existing account
- Go to security settings
- Click New Access Token, Type anything, then click Generate.
- Copy and Close (This will be your DOCKERHUB_TOKEN)
- Go to your repositories
- Create a Public Repository
- Enter a repository name and click Create (This will be your DOCKERHUB_NAME)
- Sign up for GitHub if you haven't already
- Visit the Interstellar repository, and click Create Fork
- Click Settings or "..." on Mobile.
- Scroll down and click Secrets and Variables, then click Actions
- Click New Repository Secret
- Create DOCKERHUB_TOKEN (This is the token you saved earlier.)
- Create DOCKERHUB_USERNAME (This is the username of your Docker account.)
- Create DOCKERHUB_NAME (This is your repository name on Docker)
- Go to the top of your screen and click Actions, in between Pull Requests & Projects.
- Click Configure under Docker Image
- Remove all of the code in the box and replace it with this.
name: Publish image to Docker Hub
on:
[workflow_dispatch]
jobs:
publish_image:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: build
run: |
docker build . -t ${{ secrets.DOCKERHUB_USERNAME}}/${{ secrets.DOCKERHUB_NAME}}:latest
- name: publish
run: |
docker login -u ${{ secrets.DOCKERHUB_USERNAME}} -p ${{ secrets.DOCKERHUB_TOKEN}}
docker push ${{ secrets.DOCKERHUB_USERNAME}}/${{ secrets.DOCKERHUB_NAME}}:latest
- Click Commit Changes, then click Commit Changes again.
- Go back to the Actions tab
- Click Publish image underneath "All workflows"
- Click Run workflow, then click it again.
- Click All workflows and wait for the circle to go from yellow to green.
- Go to the Render dashboard, and make an account. (You must use Gmail or it will make you verify with payment information.)
- Click New + and then click Web Service.
- Click Deploy an existing image from a registry
- Put the link as the docker image you just made, and click next.
- Name the project
- Make the instance type free
- And then click Create Web Service.