mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-09 14:46:37 +00:00
- added new file roles/web-app-shopware/files/framework.yaml defining trusted_proxies and trusted_headers for Symfony - mounted framework.yaml into /var/www/html/config/packages/ in docker-compose - exposed new role vars SHOPWARE_FRAMEWORK_HOST/DOCKER for mounting path - rendered framework.yaml via Ansible copy task with proper permissions - adjusted env.j2 to set TRUSTED_PROXIES and TRUSTED_HOSTS dynamically from domains and networks - added SHOPWARE_DOMAIN var to vars/main.yml - removed inline framework.yaml creation from Dockerfile (now managed via mount) - updated proxy template (html.conf.j2) to include X-Forwarded-Ssl header - improved init.sh permission handling for shared volumes See ChatGPT conversation for implementation details and rationale: https://chatgpt.com/share/690d4fe7-2830-800f-8b6d-b868e7fe0e97
44 lines
1018 B
YAML
44 lines
1018 B
YAML
---
|
|
- name: "Load docker, DB and proxy for {{ application_id }}"
|
|
include_role:
|
|
name: sys-stk-full-stateful
|
|
vars:
|
|
docker_compose_flush_handlers: false
|
|
|
|
- name: "Deploy {{ SHOPWARE_INIT_HOST }}"
|
|
copy:
|
|
src: init.sh
|
|
dest: "{{ SHOPWARE_INIT_HOST }}"
|
|
mode: "0755"
|
|
notify:
|
|
- docker compose up
|
|
- docker compose build
|
|
|
|
- name: "Render framework.yaml (trusted proxies/headers/hosts)"
|
|
copy:
|
|
src: "framework.yaml"
|
|
dest: "{{ SHOPWARE_FRAMEWORK_HOST }}"
|
|
mode: "0644"
|
|
notify:
|
|
- docker compose up
|
|
|
|
- name: "Flush docker compose handlers"
|
|
meta: flush_handlers
|
|
|
|
- name: Wait for Shopware HTTP endpoint
|
|
wait_for:
|
|
host: "127.0.0.1"
|
|
port: "{{ ports.localhost.http[application_id] }}"
|
|
delay: 5
|
|
timeout: 300
|
|
|
|
- name: "Ensure admin user exists with correct password"
|
|
include_tasks: 01_admin.yml
|
|
|
|
#- name: Execute setup routines (OIDC/LDAP)
|
|
# include_tasks: 02_setup.yml
|
|
#
|
|
#- name: Execute cleanup routines
|
|
# include_tasks: 03_cleanup.yml
|
|
# when: MODE_CLEANUP
|