Where can I define the "docker-compose up" command as a boot command?

My project is automated to start everything from a docker-compose.yml file, I have everything there and I have no Dockerfile files. I don’t know if render has the option and if it does I don’t know how to set it up for my hosting.

Thanks.

my file:

version: '3.8'

networks:
  backfront-net:

services:
  backend-nestjs:
    restart: always
    image: "node:20.9-bookworm-slim"
    env_file:
      - ./backend/.env
    working_dir: /srv/backend
    volumes:
      - ./backend/:/srv/backend
    ports:
      - 3000:3000
      - 9229:9229 # Para tests
    command: "npm run start:dev"
    networks:
      - backfront-net

  frontend-vuejs:
    image: "node:20.9-bookworm-slim"
    working_dir: /srv/frontend
    volumes:
      - ./frontend:/srv/frontend
    ports:
      - 8080:8080
      - 8081:8081
      - 4173:4173
      - 4174:4174
    command: bash -c "npm install && npm run build && npx http-server dist"
    #command: bash -c "npm install && npm run start:dev"
    networks:
      - backfront-net

Hi,

Render doesn’t support docker-compose files. However, we have a similar concept with our own Blueprints (render.yaml) (Blueprint spec)

Alan

And where can I specify the render.yml file? Or is that detected by the service if I put it in the root path?

Once you’ve created a render.yaml, you’d put it in the root of your repo and connect it with “New” > “Blueprint”, more here in the docs: https://docs.render.com/infrastructure-as-code#getting-started

Alan

1 Like

I’m trying to follow this part but I’m not sure how I can specify this image:

Image Layer Details - node:20.11.1-bookworm-slim | Docker Hub

docker.io/library/node:20.11.1-bookworm-slim

Alan

1 Like

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