---
application_id: "web-app-shopware"
entity_name: "{{ application_id | entity_name }}"
container_port: "{{ lookup('config', application_id, 'services.web.ports.internal.http') }}"
SHOPWARE_DOMAIN: "{{ lookup('domain',application_id) }}"
SHOPWARE_CONTAINER_VERSION: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.version') }}"
SHOPWARE_CONTAINER_IMAGE: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.image') }}"
SHOPWARE_PKG_VERSION: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.package.version') }}"
SHOPWARE_PKG_NAME: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.package.name') }}"
SHOPWARE_USER: "www-data"
SHOPWARE_ROOT: "/var/www/html"
SHOPWARE_PHP_VERSION: "{{ lookup('config', application_id, 'services.php.version') }}"
SHOPWARE_PHP_IMAGE: "{{ lookup('config', application_id, 'services.php.image') }}"
SHOPWARE_COMPOSER_PLATFORM_PHP: "{{ SHOPWARE_PHP_VERSION | regex_replace('-.*$', '') | regex_replace('^(\\d+\\.\\d+)$', '\\1.0') }}"
SHOPWARE_INIT_CONTAINER: "{{ lookup('config', application_id, 'services.init.name') }}"
SHOPWARE_WEB_CONTAINER: "{{ lookup('config', application_id, 'services.web.name') }}"
SHOPWARE_WEB_CONTAINER_ADDRESS: "{{ lookup('container_address', application_id, 'web') }}"
SHOPWARE_WORKER_CONTAINER: "{{ lookup('config', application_id, 'services.worker.name') }}"
SHOPWARE_SCHED_CONTAINER: "{{ lookup('config', application_id, 'services.scheduler.name') }}"
SHOPWARE_INIT_HOST: "{{ [ lookup('container', application_id, 'directories.volumes'), 'init.sh' ] | path_join }}"
SHOPWARE_INIT_DOCKER: "{{ lookup('volume', 'web-app-shopware', 'init_script').target }}"
SHOPWARE_FRAMEWORK_HOST: "{{ [ lookup('container', application_id, 'directories.config'), 'framework.yaml' ] | path_join }}"
SHOPWARE_ADMINOPENAUTH_HOST: "{{ [ lookup('container', application_id, 'directories.config'), 'adminopenauth.yaml' ] | path_join }}"
SHOPWARE_FILESYSTEM_HOST: "{{ [ lookup('container', application_id, 'directories.config'), 'shopware.yaml' ] | path_join }}"
SHOPWARE_OBJSTORE_ENABLED: "{{ lookup('objstore', application_id, 'enabled') }}"
SHOPWARE_WORKER_ENTRYPOINT: "{{ lookup('config', application_id, 'services.worker.entrypoint') }}"
SHOPWARE_SCHED_ENTRYPOINT: "{{ lookup('config', application_id, 'services.scheduler.entrypoint') }}"
SHOPWARE_OIDC_ENABLED: "{{ lookup('config', application_id, 'services.sso.enabled') }}"
SHOPWARE_OIDC_PLUGIN: KskHeptacomAdminOpenAuth
SHOPWARE_OIDC_INTERNAL_BASE: "http://{{ lookup('container_service', 'web-app-keycloak', 'keycloak') }}:{{ lookup('config', 'web-app-keycloak', 'services.keycloak.ports.internal.http')
}}" # nocheck: literal-protocol-lookup container-to-container hop that must bypass the canonical URL, because cURL refuses the .onion name the tls lookup returns
SHOPWARE_API_BASE: "http://127.0.0.1:{{ lookup('config', application_id, 'services.web.ports.internal.http') }}"
SHOPWARE_DESIGN_ENABLED: "{{ lookup('config', application_id, 'services.design.enabled') | bool }}"
SHOPWARE_DESIGN_PALETTE: "{{ lookup('design_palette', lookup('config', 'web-svc-design', 'services.design.colors.base')).light }}"
SHOPWARE_DESIGN_THEME_COLORS:
sw-background-color: "--design-surface-1"
sw-border-color: "--design-border-strong"
sw-color-brand-primary: "--design-primary"
sw-color-brand-secondary: "--design-text-muted"
sw-color-buy-button: "--design-primary"
sw-color-buy-button-text: "--design-on-primary"
sw-color-danger: "--design-danger"
sw-color-info: "--design-info"
sw-color-price: "--design-text"
sw-color-success: "--design-success"
sw-color-warning: "--design-warning"
sw-headline-color: "--design-text"
sw-text-color: "--design-text"
SHOPWARE_DESIGN_THEME_MEDIA:
sw-logo-desktop: "{{ lookup('design', application_id).urls.logo.svg }}"
sw-logo-favicon: "{{ lookup('design', application_id).urls.favicon.png }}"
sw-logo-mobile: "{{ lookup('design', application_id).urls.logo.svg }}"
sw-logo-share: "{{ lookup('design', application_id).urls['apple-touch-icon'].png }}"
sw-logo-tablet: "{{ lookup('design', application_id).urls.logo.svg }}"
SHOPWARE_DESIGN_THEME_VALUES: >-
{{
dict(SHOPWARE_DESIGN_THEME_COLORS.keys() | zip(SHOPWARE_DESIGN_THEME_COLORS.values() | map('extract', SHOPWARE_DESIGN_PALETTE)))
| combine(SHOPWARE_DESIGN_THEME_MEDIA if lookup('design', application_id).logo is string else {})
if SHOPWARE_DESIGN_ENABLED else {}
}}
SHOPWARE_DESIGN_SHOP_NAME: >-
{{ lookup('design', application_id).title if SHOPWARE_DESIGN_ENABLED and lookup('design', application_id).title is string else '' }}
SHOPWARE_REDIS_ENABLED: "{{ lookup('config', application_id, 'services.redis.enabled') }}"
SHOPWARE_REDIS_URL: "{{ lookup('engine', 'redis', application_id, 'url') }}"
SHOPWARE_OPENSEARCH_PORT: "{{ lookup('config', application_id, 'services.opensearch.ports.internal.http') }}"
SHOPWARE_OPENSEARCH_ENABLED: "{{ lookup('config', application_id, 'services.opensearch.enabled') }}"
SHOPWARE_OPENSEARCH_CONTAINER: "{{ lookup('config', application_id, 'services.opensearch.name') }}"
SHOPWARE_OPENSEARCH_HEAP_MB: "{{ lookup('service_memory_mb', application_id, 'opensearch', 0.5) }}"
SHOPWARE_OPENSEARCH_INITIAL_ADMIN_PASSWORD: "{{ lookup('config', application_id, 'secrets.credentials.opensearch_initial_admin_password') }}"
swarm_stack_fatal_grace: 600