Skip to content

Commit

Permalink
fix: provide own json or yaml definition file to Docker container via…
Browse files Browse the repository at this point in the history
… SWAGGER_FILE env variable (#2181)

Refs #2177
  • Loading branch information
Evgeniy Khyst committed Jun 23, 2020
1 parent 6f25e22 commit 0a18d83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-run.sh
Expand Up @@ -11,7 +11,7 @@ INDEX_FILE=$NGINX_ROOT/index.html
if [[ -f "$SWAGGER_FILE" ]]; then
cp -s "$SWAGGER_FILE" "$NGINX_ROOT"
REL_PATH="/$(basename $SWAGGER_FILE)"
sed -i "s|https://petstore.swagger.io/v2/swagger.json|$REL_PATH|g" $INDEX_FILE
sed -i "s|SwaggerEditorBundle({|SwaggerEditorBundle({\n url: '$REL_PATH',|g" $INDEX_FILE
fi

# Gzip after replacements
Expand Down

0 comments on commit 0a18d83

Please sign in to comment.