简体   繁体   中英

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/

In the configuration step, I made a docker-compose.yml file as described:

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'

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:
    image: 'redis:latest'
    command: 'redis-server --appendonly yes'
    restart: 'unless-stopped'
    volumes:
       - './data/redis:/data'
    ports:
       - "127.0.0.1:6379:6379"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM