feat(shopware): migrate to single Shopware base image and split services (web/worker/scheduler/init)

• Introduce init container and runtime-ready Dockerfile (Alpine) installing php83-gd/intl/pdo_mysql
• Disable composer scripts in builder and ignore build-time ext reqs
• New docker-compose template (web/worker/scheduler/opensearch) + persistent volumes
• Use TRUSTED_PROXIES env; fix APP_URL formatting; set OPENSEARCH_HOST=opensearch
• Replace SHOPWARE_PHP_CONTAINER refs with SHOPWARE_WEB_CONTAINER in tasks
• Render and copy init.sh via volumes path
• Remove old nginx/php split and legacy DB env task
• Fix svc-db-postgres var: database_type now uses entity_name
https://chatgpt.com/share/6907fc58-7c28-800f-a993-c207f28859c9
This commit is contained in:
2025-11-03 01:51:38 +01:00
parent d6f3618d70
commit f5efbce205
15 changed files with 293 additions and 104 deletions

View File

@@ -17,22 +17,41 @@ docker:
services:
database:
enabled: true
php:
init:
name: software-init
cpus: 1.0
mem_reservation: 1g
mem_limit: 2g
# Base PHP image used by all app services
shopware:
image: "ghcr.io/shopware/docker-base"
version: "8.3"
name: "shopware-php"
cpus: 2.0
mem_reservation: 2g
mem_limit: 4g
pids_limit: 2048
nginx:
image: "nginx"
version: "alpine"
name: "shopware-nginx"
port: 8080
web:
name: "shopware-web"
port: 8000
cpus: 1.0
mem_reservation: 1g
mem_limit: 2g
worker:
name: "shopware-worker"
entrypoint: [ "php", "bin/console", "messenger:consume", "async", "low_priority", "--time-limit=300", "--memory-limit=512M" ]
replicas: 3
cpus: 1.0
mem_reservation: 1g
mem_limit: 2g
scheduler:
name: "shopware-scheduler"
entrypoint: [ "php", "bin/console", "scheduled-task:run" ]
cpus: 0.5
mem_reservation: 256m
mem_limit: 512m
mem_reservation: 512m
mem_limit: 1g
redis:
enabled: true
image: "redis"
@@ -40,6 +59,7 @@ docker:
cpus: 0.25
mem_reservation: 256m
mem_limit: 512m
opensearch:
enabled: true
image: "opensearchproject/opensearch"
@@ -48,5 +68,6 @@ docker:
cpus: 1.0
mem_reservation: 2g
mem_limit: 4g
volumes:
data: "shopware_data"