[ https://jira.fiware.org/browse/HELP-17306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez reassigned HELP-17306: ------------------------------------- Assignee: Scorpio Dev. Team > [fiware-stackoverflow] Scorpio broker - environment variables set in docker-compose-aaio.yml not getting picked up at runtime > ----------------------------------------------------------------------------------------------------------------------------- > > Key: HELP-17306 > URL: https://jira.fiware.org/browse/HELP-17306 > Project: Help-Desk > Issue Type: Monitor > Components: FIWARE-TECH-HELP > Reporter: Backlog Manager > Assignee: Scorpio Dev. Team > Labels: fiware, fiware-scorpio > > Created question in FIWARE Q/A platform on 20-01-2021 at 18:01 > {color: red}Please, ANSWER this question AT{color} 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! -- This message was sent by Atlassian JIRA (v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy