Skip to content

Docker support #10403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
OlegKunitsyn opened this issue Apr 6, 2025 · 0 comments
Open

Docker support #10403

OlegKunitsyn opened this issue Apr 6, 2025 · 0 comments

Comments

@OlegKunitsyn
Copy link

Problem

Swagger UI can't show OpenAPI specs from services running inside the Docker network.

Solution

30 lines for Nginx: https://gitlab.com/plgrnd/swagger-ui/-/blob/main/embedding.conf

Usage

 swagger-ui:
   image: swagger-ui:latest
   environment:
     URLS: '[{"url":"/service-a:8000/v3/api-docs", "name":"service-a"},{"url":"/service-b:9000/v3/api-docs", "name":"service-b"}]'
   ports:
     - "8080:8080"

Result

Start the services and open http://localhost:8080 in your browser. The Servers drop-down will now include option Proxied server url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant