mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-08 22:28:02 +00:00
refactor(web-app-shopware): make init script idempotent and handle admin via Ansible
- moved init.sh from template to files/ for direct copying and bind mounting - removed hardcoded user creation from init process - added database emptiness check before running system:install - added new task 03_admin.yml to ensure admin user exists and update password/email via Ansible - switched docker exec shell from bash to sh for Alpine compatibility - updated Dockerfile and docker-compose.yml accordingly for mount-based init script
This commit is contained in:
@@ -6,6 +6,7 @@ x-environment: &shopware
|
||||
- media:/var/www/html/public/media
|
||||
- thumbnail:/var/www/html/public/thumbnail
|
||||
- sitemap:/var/www/html/public/sitemap
|
||||
- "{{ SHOPWARE_INIT_HOST }}:{{ SHOPWARE_INIT_DOCKER }}:ro"
|
||||
working_dir: {{ SHOPWARE_ROOT }}
|
||||
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
@@ -20,7 +21,7 @@ x-environment: &shopware
|
||||
{% set docker_restart_policy = DOCKER_RESTART_POLICY %}
|
||||
<<: *shopware
|
||||
container_name: "{{ SHOPWARE_INIT_CONTAINER }}"
|
||||
entrypoint: [ "sh", "/usr/local/bin/init.sh" ]
|
||||
entrypoint: [ "sh", "{{ SHOPWARE_INIT_DOCKER }}" ]
|
||||
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user