Skip to content

Commit f06a299

Browse files
Adds bin/redoc-container (#499)
1 parent b4b298a commit f06a299

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

bin/redoc-container

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
#
3+
# instructions:
4+
# run this script
5+
# open http://127.0.0.1:8081
6+
#
7+
# Prefer to use ./redoc - this version does not auto-reload changes
8+
9+
set -e
10+
11+
DIR=$(cd `dirname $0` && pwd)
12+
ROOT_DIR="${DIR}/.."
13+
14+
echo "Docs will be available at http://localhost:8081/"
15+
16+
docker run -it --rm -p 8081:80 \
17+
-v "${ROOT_DIR}:/usr/share/nginx/html/swagger/" \
18+
-e SPEC_URL=swagger/openapi.yaml \
19+
-e REDOC_OPTIONS="required-props-first=1 path-in-middle-panel=1" \
20+
redocly/redoc

0 commit comments

Comments
 (0)