ERROR: In file '.\docker-compose.override.yml', service must be a mapping, not a NoneType

I juat copied the Rasa docs on Docker Compose Installation to setup my docker. This is the first time I’m using docker I dont know what was wrong but the title is the error.

This is the content on docker-compose.override.yml file

version: “3.4”

services: db: volumes: - db-volume:/bitnami/postgresql

volumes: db-volume: name: db-volume

This is what you provided, formatted:

This is the content on docker-compose.override.yml file

version: "3.4"

services:
db:
   volumes:
      - db-volume:/bitnami/postgresql

volumes:
db-volume:
   name: db-volume

your list of services needs to be indented under services (same with volumes if you provide them that way):


version: "3.4"

services:
  db:
    volumes:
      - db-volume:/bitnami/postgresql

volumes:
  db-volume:
    name: db-volume

Though i should add that this looks different from the docker-compose file, so i’m not sure where that code came from.

It works! Thank you for helping me. I just got this code from Rasa Docs on the link under docker-compose.override . Anyway thank you again for the help.

Anytime! Would you mind linking to where you found that so that i can fix it?

Here under the Postgres Database Storage > Windows Powershell > docker-compose.override.yml

This still isn’t fixed, by the way. I just got the same error due to the incorrect indentation on the code sample.