Unsupported config option for services problme, when writing docker-compose.yml

Hi, community

I’m struggled with docker-compose. Here is my 1st written docker-compose.yml. Very simple but doesn’t work. Do you know why?

services:
  rasa:
    image: rasa/rasa:1.7.0-full
    ports:
      - "5005:5005"
    volumes:
      - ./:/app
    depends_on:
      - action-server

  action-server:
    image: sz/ticket:latest
    volumes:
      - ./actions:/app/actions
    ports:
      - "5055:5055"

ERROR:

root@iZZ:~/ticket# docker-compose up
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services: 'action-server'

update the docker-compose.yml to:

version: "3.4"
services:
  rasa:
    image: rasa/rasa:1.7.0-full
    ports:
      - "5005:5005"
    volumes:
      - ./:/app
    depends_on:
      - action-server

  action-server:
    image: sz/ticket:latest
    volumes:
      - ./actions:/app/actions
    ports:
      - "5055:5055"
    container_name: action_server

By doing this, it fixed the config error.

2 Likes

You solved it before I could even respond. :slight_smile: