mirror of
https://github.com/goharbor/harbor
synced 2025-04-18 18:09:48 +00:00
update prepare-swagger.sh for remove swagger.ymal show error
This commit is contained in:
parent
2eb1845ae4
commit
226b988a5b
|
@ -20,7 +20,7 @@ To deploy Harbor on Kubernetes, it requires some additional steps because
|
|||
```
|
||||
|
||||
2. The registry config file needs to have the IP (or DNS name) of the registry, but on Kubernetes, you don't know the IP before the service is created. There are several workarounds to solve this problem for now:
|
||||
- Use DNS name and link th DNS name with the IP after the service is created.
|
||||
- Use DNS name and link the DNS name with the IP after the service is created.
|
||||
- Rebuild the registry image with the service IP after the service is created and use ```kubectl rolling-update``` to update to the new image.
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ tar -C ../static/vendors -zxf swagger.tar.gz swagger-ui-2.1.4/dist
|
|||
echo "Executing some processes..."
|
||||
sed -i.bak 's/http:\/\/petstore\.swagger\.io\/v2\/swagger\.json/'$SCHEME':\/\/'$SERVER_IP'\/static\/resources\/yaml\/swagger\.yaml/g' \
|
||||
../static/vendors/swagger-ui-2.1.4/dist/index.html
|
||||
sed -i.bak '/jsonEditor: false,/a\ validatorUrl: null,' ../static/vendors/swagger-ui-2.1.4/dist/index.html
|
||||
mkdir -p ../static/resources/yaml
|
||||
cp swagger.yaml ../static/resources/yaml
|
||||
sed -i.bak 's/host: localhost/host: '$SERVER_IP'/g' ../static/resources/yaml/swagger.yaml
|
||||
|
|
Loading…
Reference in New Issue
Block a user