compose-spec / compose-spec

The Compose specification

Home Page:https://compose-spec.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include files marked as `Invalid type. Expected "include"`

BenjaminNolan opened this issue · comments

What is the problem you're trying to solve
I have a compose.yml file which includes other ./path/to/compose.yml files relative to itself. These includes work correctly with docker compose, however they are flagged with the error Invalid type. Expected "include" by yaml-schema using the compose-spec.json file located within this repo's main branch as accessed via https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json.

Describe the solution you'd like
compose-spec.json needs to be updated to specify the correct format for include:.

Additional context
example compose.yml:

version: "3"

include:
  - "./docker/pgadmin/compose.yml"
  - "./docker/portainer/compose.yml"
  - "./docker/postgres/compose.yml"
  - "./docker/zipkin/compose.yml"

services:
  backend:
    container_name: backend
    image: ghcr.io/path/to/backend:latest
    depends_on:
      - postgres
    volumes:
      - ./backend:/app

image

image

Appears that perhaps #456 fixes this?

@n8felton I can confirm that #456 does indeed fix this.