1
   version: '3'
    services:
      mongo:
        image: mongo:4.2.8
        restart: unless-stopped
        ports:
          - 27017:27017
        volumes:
          - mongodb:/data/db
          - mongodb_config:/data/configdb
      pisignage-server:
        image: pisignage/pisignage-server:latest
        restart: unless-stopped
        ports:
          - 3000:3000
        volumes:
          - media:/media
          - data:/data
        depends_on:
          mongo:
            condition: service_started
    
    volumes:
      mongodb:
      mongodb_config:
      media:
      data:

So every singe time i try to compose I get following error: ERROR: The Compose file './docker-compose.yml' is invalid because: services.pisignage-server.depends_on contains an invalid type, it should be an array

Any Idea what I am missing?

1
  • Thanks for pointing out, we have added a new docker-compose.yml file which takes care of these issues Commented Apr 21, 2021 at 1:24

1 Answer 1

1

#1 depends_on should be an array e.g.

enter image description here

Also #2

Version 3 no longer supports the condition form of depends_on.

see https://docs.docker.com/compose/compose-file/compose-file-v3/#depends_on

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.