How to write this render.yaml file?

Hey there, I need help translating this docker compose file to render.yaml. Would be pretty good to have a way to convert it using the dashboard.

version: '3.8'
services:
  proxy:
    image: gcr.io/cloudsql-docker/gce-proxy:1.33.1
    volumes:
      - ./credentials.json:/secrets/cloudsql/credentials.json
    ports:
      - '54320:54320'
    command: >
      /cloud_sql_proxy 
      -instances=${CLOUD_SQL_INSTANCE_NAME}=tcp:0.0.0.0:54320
      -credential_file=/secrets/cloudsql/credentials.json

We already have this in our render.yaml file for this service:

services:
  - type: web
    name: traba-server-node-dev
    env: docker
    branch: main
    dockerfilePath: ./Dockerfile
    dockerContext: ./

We need this second image to run and load in the same instance.

Thank you for the support!

I suspect what you’ll want to do here is define a new service in your render.yaml for the proxy, probably using a pserv and then have a new Dockerfile specific for the proxy and have the render.yaml use that for this new service. Once the service is created you can add a secret file (https://render.com/docs/docker-secrets) and then refer to that path in the command.

Regards,

John B

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.