question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: ability to set oauth2RedirectUrl using env vars in Docker

See original GitHub issue

Currently, docker-run.sh sed’s out some placeholders in index.html for env vars that are set when running swagger-ui as a Docker container. This is great; however, there’s a need to be able to set oauth2RedirectUrl in an environment variable as well – as right now this is ‘baked in’ to http://localhost:3200/oauth2-redirect.html .

In #2844 @bodnia suggests changing the constructor of SwaggerUIBundle, which I could obviously do; however, I’d rather use the stock image as it is.

Have you had any thoughts about exposing the config in swagger-config.yaml to environment variables?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
shankie-codescommented, May 30, 2017

Ah cool thanks @bodnia @webron – it should do what I want! Sorry that I missed that – might be worth explicitly mentioning that in the readme so that lazy people like me who are searching the repo for terms such as oauth2RedirectUrl will find what they’re looking for 😄

I’ll close the issue for now, but if I run into any problems, I’ll come back

0reactions
webroncommented, May 31, 2017

Yeah, I believe that should work, but you know… test, test, test 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Environment variables in Compose | Docker Documentation
How to set, use and manage environment variables in Compose. ... The .env file feature only works when you use the docker-compose up...
Read more >
Configuration - Swagger Documentation
How to configure. Swagger UI accepts configuration parameters in four locations. From lowest to highest precedence: The swagger-config.yaml in the ...
Read more >
How to use environment variables in docker-compose?
If an environment variable is not set, Compose substitutes with an empty string. ... The feature was added in this pull request.
Read more >
GitLab CI/CD variables
A variable of type File : KUBE_CA_PEM with a certificate as the value. Use the variables in a job script like this: kubectl...
Read more >
Docker ARG, ENV and .env - a Complete Guide - vsupalov.com
Read on and you will understand how to configure your Docker images and dockerized apps with ease - with the power of Docker...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found