Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose up -d does not launch app, give error: '/multi-container-app/compose.yaml: services.todo-app Additional property develop is not allowed' #11

Open
skylarcalvert opened this issue Dec 13, 2023 · 2 comments

Comments

@skylarcalvert
Copy link

I pulled directly from this repo as the docker desktop walkthrough asks and ran provided command given and received the following error:

➜  multi-container-app git:(main) ✗ docker compose up -d
validating /Users/scalvert/source/multi-container-app/compose.yaml: services.todo-app Additional property develop is not allowed

compose.yaml file:

# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Docker compose reference guide at
# https://docs.docker.com/compose/compose-file/

# Here the instructions define your application as two services called "todo-app" and “todo-database”
# The service “todo-app” is built from the Dockerfile in the /app directory,
# and the service “todo-database” uses the official MongoDB image 
# from Docker Hub - https://hub.docker.com/_/mongo. 
# You can add other services your application may depend on here.

services:
  todo-app:
    build:
      context: ./app
    depends_on:
      - todo-database
    environment:
      NODE_ENV: production
    ports:
      - 3000:3000
      - 35729:35729
    develop:
      watch:
        - path: ./app/package.json
          action: rebuild
        - path: ./app
          target: /usr/src/app
          action: sync

  todo-database:
    image: mongo:6
    #volumes: 
    #  - database:/data/db
    ports:
      - 27017:27017

#volumes:
  #database:
@muhammad-zulqarnain-awan

Remove or comment the "develop" section and then run "docker compose up -d"

@glours
Copy link
Contributor

glours commented Feb 15, 2024

Hey @skylarcalvert
Which version of Docker Compose were you using?
The develop section is use by the docker compose watch command which was added as GA in Compose v2.22.0 last September

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants