Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-17306

FIWARE.Question.Tech.Scorpio broker - environment variables set in docker-compose-aaio.yml not getting picked up at runtime.

    Details

      Description

      Created question in FIWARE Q/A platform on 20-01-2021 at 18:01
      Please, ANSWER this question AT https://stackoverflow.com/questions/65814811/scorpio-broker-environment-variables-set-in-docker-compose-aaio-yml-not-gettin

      Question:
      Scorpio broker - environment variables set in docker-compose-aaio.yml not getting picked up at runtime

      Description:
      I am running Scorpio using the docker-compose file: docker-compose-aaio.yml but I want to use an RDS postgres instance rather than a container instance. I have updated the docker-compose-aaio.yml file as follows:
      version: '3'

      services:
      zookeeper:
      image: zookeeper
      ports:

      • "2181"
        kafka:
        image: wurstmeister/kafka
        hostname: kafka
        ports:
      • "9092"
        environment:
        KAFKA_ADVERTISED_HOST_NAME: kafka
        KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
        KAFKA_ADVERTISED_PORT: 9092
        volumes:
      • /var/run/docker.sock:/var/run/docker.sock
        depends_on:
      • zookeeper
        logging:
        driver: none
        scorpio:
        image: scorpiobroker/scorpio:scorpio-aaio_1.0.2
        ports:
      • "9090:9090"
        depends_on:
      • kafka
        environment:
        spring_args: --maxLimit=1000 --reader.datasource.hikari.url=jdbc:postgresql//myrdshost.eu-west-2.rds.amazonaws.com:5432/ngb?ApplicationName=ngb_storagemanager_reader --writer.datasource.hikari.url=jdbc:postgresql//myrdshost.eu-west-2.rds.amazonaws.com:5432/ngb?ApplicationName=ngb_storagemanager_writer

      However when I run this with: docker-compose -f docker-compose-aaio.yml up I get this error:
      java.net.UnknownHostException: postgres
      as though the Scorpio broker is still trying to use the default postgres database urls (i.e trying to use a containerised postgres instance). It's seems like the environment variables I set under spring_args are not getting applied.
      I have followed the documentation in Chapters 4 and 5 here: https://scorpio.readthedocs.io/_/downloads/en/latest/pdf/.
      Can you see anything I am doing wrong?
      Thanks!

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2021-01-25 09:20|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2021-01-25 09:20|CREATED monitor | # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2021-02-01 10:04|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2021-02-01 10:04|UPDATED status: transition Finish| # answers= 1, accepted answer= True

          People

          • Assignee:
            scorpio.team Scorpio Dev. Team
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: