从 Docker-Compose 创建渲染蓝图

问题描述 投票:0回答:1

这是我的存储库的链接:https://github.com/RohanAlmighty/Python-Docker-NSE-Fetcher

有人可以帮助我从 docker-compose.yaml 编写正确的 render.yaml 我尝试遵循渲染蓝图文档,但我对渲染和 Docker 都很陌生,无法弄清楚太多。

Docker 撰写:

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

渲染 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

render blueprint error

docker docker-compose render.com
1个回答
0
投票

看起来你忘记了

envVars:

services:
  - type: web
    name: python-fastapi-quote
    runtime: docker
    dockerfilePath: ./quote/Dockerfile
    envVars:
    - key: PORT
      value: 8000
  - type: web
    name: python-fastapi-search
    runtime: docker
    dockerfilePath: ./search/Dockerfile
    envVars:
    - key: PORT
      value: 8002
  - type: web
    name: python-fastapi-fetcher
    runtime: docker
    dockerfilePath: ./fetcher/Dockerfile
    envVars:
    - key: PORT
      value: 8001
© www.soinside.com 2019 - 2024. All rights reserved.