mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-11-04 04:08:15 +00:00 
			
		
		
		
	feat(magento): switch to ghcr.io/alexcheng1982/docker-magento2:2.4.6-p3; update Compose/Env/Tasks/Docs
• Docs: updated to MAGENTO_VOLUME; removed Installation/User_Administration guides • Compose: volume path → /var/www/html; switched variables to MAGENTO_*/MYSQL_*/OPENSEARCH_* • Env: new variable set + APACHE_SERVERNAME • Task: setup:install via docker compose exec (multiline form) • Schema: removed obsolete credentials definition Link: https://chatgpt.com/share/68b8dc30-361c-800f-aa69-88df514cb160
This commit is contained in:
		@@ -1,6 +1,32 @@
 | 
			
		||||
- name: "load docker, db/redis/proxy for {{ application_id }}"
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: sys-stk-full-stateful
 | 
			
		||||
  vars:
 | 
			
		||||
    docker_compose_flush_handlers:  true
 | 
			
		||||
 | 
			
		||||
- name: flush docker service
 | 
			
		||||
  meta: flush_handlers
 | 
			
		||||
- name: "Run Magento setup:install (in container)"
 | 
			
		||||
  command: >
 | 
			
		||||
    docker compose exec -T application bash -lc "
 | 
			
		||||
    cd /var/www/html && bin/magento setup:install \
 | 
			
		||||
      --base-url='{{ MAGENTO_URL }}/' \
 | 
			
		||||
      --db-host=\"$MYSQL_HOST\" \
 | 
			
		||||
      --db-name=\"$MYSQL_DATABASE\" \
 | 
			
		||||
      --db-user=\"$MYSQL_USER\" \
 | 
			
		||||
      --db-password=\"$MYSQL_PASSWORD\" \
 | 
			
		||||
      --search-engine='opensearch' \
 | 
			
		||||
      --opensearch-host=\"$OPENSEARCH_HOST\" \
 | 
			
		||||
      --opensearch-port=\"$OPENSEARCH_PORT_NUMBER\" \
 | 
			
		||||
      --admin-firstname=\"$MAGENTO_ADMIN_FIRSTNAME\" \
 | 
			
		||||
      --admin-lastname=\"$MAGENTO_ADMIN_LASTNAME\" \
 | 
			
		||||
      --admin-email=\"$MAGENTO_ADMIN_EMAIL\" \
 | 
			
		||||
      --admin-user=\"$MAGENTO_ADMIN_USERNAME\" \
 | 
			
		||||
      --admin-password=\"$MAGENTO_ADMIN_PASSWORD\""
 | 
			
		||||
  args:
 | 
			
		||||
    chdir: "{{ docker_compose.directories.instance }}"
 | 
			
		||||
  register: magento_install
 | 
			
		||||
  changed_when: >
 | 
			
		||||
    (magento_install.stdout is defined and
 | 
			
		||||
     ('Magento installation complete' in magento_install.stdout
 | 
			
		||||
      or 'successfully installed' in magento_install.stdout))
 | 
			
		||||
 | 
			
		||||
- include_tasks: utils/run_once.yml
 | 
			
		||||
@@ -2,8 +2,3 @@
 | 
			
		||||
- name: "construct {{ role_name }}"
 | 
			
		||||
  include_tasks: 01_core.yml
 | 
			
		||||
  when: run_once_web_app_magento is not defined
 | 
			
		||||
 | 
			
		||||
- name: run the docker magento tasks once
 | 
			
		||||
  set_fact:
 | 
			
		||||
    run_once_web_app_magento: true
 | 
			
		||||
  when: run_once_web_app_magento is not defined
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user