Help With Render Blueprint

Here is the link to my repo: GitHub - RohanAlmighty/Python-Docker-NSE-Fetcher

Can someone help me by writing the correct render.yaml from the docker-compose.yaml

Docker Compose:

networks:

default:
name: nse-net

services:

python-fastapi-quote:
build:
context: ./quote
dockerfile: Dockerfile
image: python-fastapi-quote
ports:
- “8000:8000”
command: python ./app/main.py
container_name: python-fastapi-quote

python-fastapi-search:
build:
context: ./search
dockerfile: Dockerfile
image: python-fastapi-search
ports:
- “8002:8002”
command: python ./app/main.py
container_name: python-fastapi-search

python-fastapi-fetcher:
build:
context: ./fetcher
dockerfile: Dockerfile
image: python-fastapi-fetcher
ports:
- “8001:8001”
command: python ./app/main.py
container_name: python-fastapi-fetcher

Render YAML

services:

  • type: web
    name: python-fastapi-quote
    runtime: docker
    dockerfilePath: ./quote/Dockerfile
    • key: PORT
      value: 8000
  • type: web
    name: python-fastapi-search
    runtime: docker
    dockerfilePath: ./search/Dockerfile
    • key: PORT
      value: 8002
  • type: web
    name: python-fastapi-fetcher
    runtime: docker
    dockerfilePath: ./fetcher/Dockerfile
    • key: PORT
      value: 8001

Hi there,

The only thing you may need to add is the dockerCommand option which would be the command from Docker Compose. Just be mindful that this would override both the CMD and ENTRYPOINT from your image. You don’t set a CMD but if the ENTRYPOINT from the base image, you will likely need to add your commands as a CMD in your Dockerfiles.

Regards,

Keith
Render Support, UTC+10 :australia: