Skip to content

Expose shlink's API endpoints via swagger ui while running Docker image #1875

Answered by acelaya
bbednarek asked this question in Help wanted
Discussion options

You must be logged in to vote

If you apply this diff to the docker-compose.yml file, you'll have a swagger-ui on http://localhost:8005 which serves the Open API spec from docs/swagger.

diff --git a/docker-compose.yml b/docker-compose.yml
index ca0064b4..9f3a01a1 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -193,3 +193,11 @@ services:
         environment:
             RABBITMQ_DEFAULT_USER: "rabbit"
             RABBITMQ_DEFAULT_PASS: "rabbit"
+
+    shlink_swagger_ui:
+        container_name: shlink_swagger_ui
+        image: swaggerapi/swagger-ui:v5.7.1
+        ports:
+            - "8005:8080"
+        volumes:
+            - ./docs/swagger:/app

I'll push this change soon to develop.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@bbednarek
Comment options

@acelaya
Comment options

@acelaya
Comment options

Answer selected by acelaya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants