简体   繁体   English

docker-compose:服务的配置选项不受支持:“redis”

[英]docker-compose: Unsupported config option for services: 'redis'

I am going through getting started page for installing ttn stack: https://thethingsstack.io/v3.8.1/getting-started/installation/configuration/我正在浏览安装 ttn 堆栈的入门页面: https://thethingsstack.io/v3.8.1/getting-started/installation/configuration/

In the configuration step, I made a docker-compose.yml file as described:在配置步骤中,我制作了一个 docker-compose.yml 文件,如下所述:

services:
    cockroach:
        image: 'cockroachdb/cockroach'
        command: 'start --http-port 26256 --insecure'
        restart: 'unless-stopped'
        volumes:
           - './data/cockroach:/cockroach/cockroach-data'
        ports:
           - "127.0.0.1:26257:26257" # Cockroach
           - "127.0.0.1:26256:26256" # WebUI
    redis:
        image: 'redis:latest'
        command: 'redis-server --appendonly yes'
        restart: 'unless-stopped'
        volumes:
           - './data/redis:/data'
        ports:
           - "127.0.0.1:6379:6379"
    stack:
        image: 'thethingsnetwork/lorawan-stack'
        entrypoint: 'ttn-lw-stack'
        command: 'start all -c /config/ttn-lw-stack.yml'
        restart: 'unless-stopped'
        depends_on:
            - 'cockroach'
            - 'redis'
   
        ports:
            - '80:1885'
            - '443:8885' 
            - '1881:1881'
            - '8881:8881'
            - '1882:1882'
            - '8882:8882'
            - '1883:1883'
            - '8883:8883'
            - '1884:1884'
            - '8884:8884'
            - '1887:1887'
            - '8887:8887'
            - '1700:1700/udp'
        environment:
            TTN_LW_BLOB_LOCAL_DIRECTORY: '/srv/ttn-lorawan/public/blob'         
            TTN_LW_REDIS_ADDRESS: 'redis:6379'
            TTN_LW_IS_DATABASE_URI: 'postgres://root@cockroach:26257/ttn_lorawan?sslmode=disable'  
      
        volumes:
            - './data/blob:/srv/ttn-lorawan/public/blob'
            - './config/stack:/config:ro'
          # If using Let's Encrypt
            - './acme:/root/deployment_files/acme'

But when I run:但是当我运行时:

docker-compose pull

I get following error:我收到以下错误:

The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services: 'redis' Compose 文件 './docker-compose.yml' 无效,因为:不支持的服务配置选项:'redis'

I am not able to figure out what is going on.我无法弄清楚发生了什么。 Any help?有什么帮助吗?

Thank you谢谢

I think it's because of the : on redis: under volumes.我认为这是因为:redis:下卷。

redis:
    image: 'redis:latest'
    command: 'redis-server --appendonly yes'
    restart: 'unless-stopped'
    volumes:
       - './data/redis:/data'
    ports:
       - "127.0.0.1:6379:6379"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows中的docker-compose:服务的不受支持的配置选项:“ web” - docker-compose in windows: Unsupported config option for services: 'web' docker-compose:services.db 不支持的配置选项:“jupyter” - docker-compose: Unsupported config option for services.db: 'jupyter' docker-compose:服务服务不支持的配置选项:'web' - docker-compose : Unsupported config option for services service: 'web' docker-compose不支持的服务配置 - docker-compose unsupported config for services docker-compose:“运行时”不支持的配置选项 - docker-compose: Unsupported config option for 'runtime' 相当于docker-compose中的docker选项--config - equivalent of docker option --config in docker-compose 错误:撰写文件“.\docker-compose.yml”无效,因为:服务的配置选项不受支持。drupal:“postgres” - ERROR: The Compose file '.\docker-compose.yml' is invalid because: Unsupported config option for services.drupal: 'postgres' 错误:撰写文件“./docker-compose.yml”无效,因为:服务不支持的配置选项:“sqlite3” - ERROR: The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services: 'sqlite3' 错误:撰写文件“./docker-compose.yml”服务的配置选项不受支持。web:“dockerfile” - ERROR: The Compose file './docker-compose.yml' Unsupported config option for services.web: 'dockerfile' Compose 文件“./docker-compose.yml”无效,因为:services.docker-image 的配置选项不受支持:“update_config” - The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services.docker-image: 'update_config'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM