-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SC-16584: Update of swagger-ui image and Glue Infrastructure preparation
- Loading branch information
Showing
5 changed files
with
117 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
generator/src/templates/nginx/http/gateway/glue-backend.server.conf.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
{% extends "nginx/http/gateway/server.conf.twig" %} | ||
{% block locations %} | ||
{{ parent() }} | ||
location /schema.yml { | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection $connection_upgrade; | ||
proxy_set_header X-SCHEMA-BASE-URL $scheme://$host; | ||
|
||
resolver 127.0.0.11 valid=10s; | ||
set $cli_proxy_pass http://cli:9000/glueBackendSchema/; | ||
proxy_pass $cli_proxy_pass; | ||
} | ||
{% endblock locations %} |
16 changes: 15 additions & 1 deletion
16
generator/src/templates/nginx/http/gateway/glue-storefront.server.conf.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
{% include 'nginx/http/gateway/glue.server.conf.twig' with _context %} | ||
{% extends "nginx/http/gateway/server.conf.twig" %} | ||
{% block locations %} | ||
{{ parent() }} | ||
location /schema.yml { | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection $connection_upgrade; | ||
proxy_set_header X-SCHEMA-BASE-URL $scheme://$host; | ||
|
||
resolver 127.0.0.11 valid=10s; | ||
set $cli_proxy_pass http://cli:9000/glueStorefrontSchema/; | ||
proxy_pass $cli_proxy_pass; | ||
} | ||
{% endblock locations %} |
2 changes: 1 addition & 1 deletion
2
generator/src/templates/service/swagger-ui/default/swagger-ui.yml.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{% include "service/#{engine}/v3.24/#{engine}.yml.twig" with _context only %} | ||
{% include "service/#{engine}/v5.9/#{engine}.yml.twig" with _context only %} |
17 changes: 17 additions & 0 deletions
17
generator/src/templates/service/swagger-ui/v5.9/swagger-ui.yml.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% set protocol = project['docker']['ssl']['enabled'] ? 'https://' : 'http://' %} | ||
{% set firstGlueEndpointMap = project['_endpointMap'] | first %} | ||
{{ serviceName }}: | ||
image: swaggerapi/swagger-ui:v5.9.0 | ||
networks: | ||
- private | ||
labels: | ||
'spryker.app.name': swagger | ||
'spryker.app.type': hidden | ||
'spryker.project': ${SPRYKER_DOCKER_PREFIX}:${SPRYKER_DOCKER_TAG} | ||
environment: | ||
URLS: "[{ url: \"{{ protocol ~ firstGlueEndpointMap['glue'] }}/schema.yml\", name: \"(Old) Glue API\" }]" | ||
healthcheck: | ||
test: [ "CMD", "nc", "-z", "localhost", "8080" ] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 5 |