docker-compose.yml

services:
  rasa_api:
    image: $
    restart: always
    user: root
    container_name: $
    deploy:
      resources:
        limits:
          cpus: "$"
          memory: "$"
      restart_policy:
        condition: any
        delay: 3s
        #max_attempts: 6
        #window: 60s 
    volumes:        
      - "$/app:/app"
    ports:
      - "$:$"
    tty: true
    privileged: true 
    working_dir: /app
    command: ['rasa','run','--enable-api']
    #command:
    #  - rasa
    #  - run
    #  - --enable-api
    environment:
        - TZ=Asia/Shanghai
        - LANG=zh_CN.UTF-8
        - PIP_ROOT_USER_ACTION=ignore
        - PIP_DISABLE_PIP_VERSION_CHECK=true
    networks:
      - default_net
  #----------------------------------------------------------------------------------
  rasa_action:
    image: $
    restart: always
    user: root
    container_name: $
    deploy:
      resources:
        limits:
          cpus: "$"
          memory: "$"
      restart_policy:
        condition: any
        delay: 3s
    volumes:        
      - "$/app:/app"
    ports:
      - "$:$" 
    tty: true
    privileged: true 
    working_dir: /app
    command: ['rasa','run','actions']
    #command:
    #  - rasa
    #  - actions 
    environment:
        - TZ=Asia/Shanghai
        - LANG=zh_CN.UTF-8
        - PIP_ROOT_USER_ACTION=ignore
        - PIP_DISABLE_PIP_VERSION_CHECK=true
    networks:
      - default_net
networks:
  default_net: 
    name: $
    driver: bridge
    external: true



endpoints.yml

action_endpoint:
  #url: "http://localhost:5055/webhook" 
  url: "http://rasa_action:5055/webhook"