-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce a new GlueBackendApi endpoint (#256)
* Introduce a new GlueBackendApi endpoint * Glue env vars extension * SC-8094: updated docs * Update 09-troubleshooting.md Co-authored-by: Filip Sushko <[email protected]>
- Loading branch information
1 parent
46b5e99
commit aaaba5f
Showing
17 changed files
with
114 additions
and
4 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
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
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
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
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,23 @@ | ||
{{ applicationName | lower }}: | ||
image: ${SPRYKER_DOCKER_PREFIX}_run_app:${SPRYKER_DOCKER_TAG}-{{ applicationName | lower }} | ||
depends_on: | ||
- database | ||
- broker | ||
- key_value_store | ||
- session | ||
- search | ||
networks: | ||
- private | ||
labels: | ||
'spryker.app.name': {{ applicationName }} | ||
'spryker.app.type': glue-backend | ||
'spryker.project': ${SPRYKER_DOCKER_PREFIX}:${SPRYKER_DOCKER_TAG} | ||
env_file: | ||
- ${DEPLOYMENT_PATH}/env/{{ applicationName }}.env | ||
environment: | ||
SPRYKER_TESTING_ENABLED: ${SPRYKER_TESTING_ENABLE} | ||
SPRYKER_XDEBUG_HOST_IP: ${SPRYKER_XDEBUG_HOST_IP} | ||
TIDEWAYS_APIKEY: ${TIDEWAYS_APIKEY} | ||
TIDEWAYS_CLI_ENABLED: ${TIDEWAYS_CLI_ENABLED} | ||
TIDEWAYS_ENVIRONMENT_NAME: ${TIDEWAYS_ENVIRONMENT_NAME} | ||
<<: *app-volumes |
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 @@ | ||
{% include "application/glue.yml.twig" with _context %} |
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 @@ | ||
{% include "env/application/zed.env.twig" with _context %} |
1 change: 1 addition & 0 deletions
1
generator/src/templates/env/application/glue-storefront.env.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 @@ | ||
{% include "env/application/glue.env.twig" with project %} |
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
1 change: 1 addition & 0 deletions
1
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{% extends "nginx/http/gateway/server.conf.twig" %} |
1 change: 1 addition & 0 deletions
1
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{% include 'nginx/http/gateway/glue.server.conf.twig' with _context %} |
39 changes: 39 additions & 0 deletions
39
generator/src/templates/nginx/http/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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{% extends "nginx/http/application.server.conf.twig" %} | ||
{% block server %} | ||
{{ parent() }} | ||
|
||
{% include "nginx/vhost.d/glue-backend.default.conf.twig" with _context %} | ||
{% include "nginx/vhost.d/timeouts.conf.twig" with { timeout: timeout | default('1m') } %} | ||
{% endblock server %} | ||
{% block location %} | ||
{{ parent() }} | ||
|
||
fastcgi_param SPRYKER_ZED_HOST "{{ zedHost | split(':') | first }}"; | ||
fastcgi_param SPRYKER_ZED_PORT "{{ project['_defaultPort'] }}"; | ||
|
||
fastcgi_param SPRYKER_SESSION_BE_NAMESPACE "{{ storeServices['session']['namespace'] | default(endpointData['services']['session']['namespace']) }}"; | ||
fastcgi_param SPRYKER_GLUE_BACKEND_HOST "{{ host }}"; | ||
fastcgi_param SPRYKER_GLUE_BACKEND_PORT "{{ externalPort }}"; | ||
|
||
{% if storeServices['mail']['sender']['email'] is not empty %} | ||
fastcgi_param SPRYKER_MAIL_SENDER_EMAIL "{{ storeServices['mail']['sender']['email'] }}"; | ||
{% endif %} | ||
{% if storeServices['mail']['sender']['name'] is not empty %} | ||
fastcgi_param SPRYKER_MAIL_SENDER_NAME "{{ storeServices['mail']['sender']['name'] }}"; | ||
{% endif %} | ||
|
||
{% if project['_endpointMap'][endpointData['store']]['yves'] is not empty %} | ||
fastcgi_param SPRYKER_FE_HOST "{{ project['_endpointMap'][endpointData['store']]['yves'] }}"; | ||
fastcgi_param SPRYKER_FE_PORT "{{ (project['_endpointMap'][endpointData['store']]['yves'] | split(':'))[1] | default(project['_defaultPort']) }}"; | ||
{% endif %} | ||
|
||
{% if project['_endpointMap'][endpointData['store']]['glue'] is not empty %} | ||
fastcgi_param SPRYKER_API_HOST "{{ project['_endpointMap'][endpointData['store']]['glue'] }}"; | ||
fastcgi_param SPRYKER_API_PORT "{{ (project['_endpointMap'][endpointData['store']]['glue'] | split(':'))[1] | default(project['_defaultPort']) }}"; | ||
{% endif %} | ||
|
||
{% if project['_endpointMap'][endpointData['store']]['glue-storefront'] is not empty %} | ||
fastcgi_param SPRYKER_API_HOST "{{ project['_endpointMap'][endpointData['store']]['glue-storefront'] }}"; | ||
fastcgi_param SPRYKER_API_PORT "{{ (project['_endpointMap'][endpointData['store']]['glue-storefront'] | split(':'))[1] | default(project['_defaultPort']) }}"; | ||
{% endif %} | ||
{% endblock location %} |
23 changes: 23 additions & 0 deletions
23
generator/src/templates/nginx/http/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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% extends "nginx/http/application.server.conf.twig" %} | ||
{% block server %} | ||
{{ parent() }} | ||
|
||
{% include "nginx/vhost.d/glue-storefront.conf.twig" with _context %} | ||
{% include "nginx/vhost.d/timeouts.conf.twig" with { timeout: timeout | default('1m') } %} | ||
{% endblock server %} | ||
{% block location %} | ||
{{ parent() }} | ||
fastcgi_param SPRYKER_ZED_HOST "{{ zedHost | split(':') | first }}"; | ||
fastcgi_param SPRYKER_ZED_PORT "{{ (zedHost | split(':'))[1] | default(project['_defaultPort']) }}"; | ||
|
||
fastcgi_param SPRYKER_GLUE_STOREFRONT_HOST "{{ host }}"; | ||
fastcgi_param SPRYKER_GLUE_STOREFRONT_PORT "{{ externalPort }}"; | ||
fastcgi_param SPRYKER_GLUE_APPLICATION_CORS_ALLOW_ORIGIN "{{ endpointData['cors-allow-origin'] | default('') | nginx_var }}"; | ||
|
||
{% if storeServices['mail']['sender']['email'] is not empty %} | ||
fastcgi_param SPRYKER_MAIL_SENDER_EMAIL "{{ storeServices['mail']['sender']['email'] }}"; | ||
{% endif %} | ||
{% if storeServices['mail']['sender']['name'] is not empty %} | ||
fastcgi_param SPRYKER_MAIL_SENDER_NAME "{{ storeServices['mail']['sender']['name'] }}"; | ||
{% endif %} | ||
{% endblock location %} |
1 change: 1 addition & 0 deletions
1
generator/src/templates/nginx/vhost.d/glue-backend.default.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 |
---|---|---|
@@ -0,0 +1 @@ | ||
client_max_body_size {{ applicationData['http']['max-request-body-size'] | default('10m') }}; |
1 change: 1 addition & 0 deletions
1
generator/src/templates/nginx/vhost.d/glue-storefront.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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{% include 'nginx/vhost.d/glue.default.conf.twig' %} |
1 change: 1 addition & 0 deletions
1
generator/src/templates/terraform/application/glue-backend.tf.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 @@ | ||
{% include "terraform/application/zed.tf.twig" with _context %} |
1 change: 1 addition & 0 deletions
1
generator/src/templates/terraform/application/glue-storefront.tf.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 @@ | ||
{% include 'terraform/application/glue.tf.twig' with _context %} |