Skip to content
imlostincode
ENNL
Deployment kit

symfony-k8s-deployment-kit

The same idea for Symfony apps: one shared deploy setup instead of a copy in every project.

UnreleasedYou're reading the docs from main. Things here can change before the next release.Back to the latest release →
examples / main

overlay-production/patches/cache-warmup-extras.yaml

View on GitHub ↗ (opens in a new tab)
yaml
# Project-specific cache-warmup additions: bundle-provided commands that
# don't ship with stock Symfony (UX Icons, PrestaSitemapBundle, etc.).
#
# Note the explicit listing of all four init container names. Without this
# pin, kustomize's strategic-merge reorders the patched item to position 0,
# which breaks startup (wait-for-postgres must run first).
apiVersion: apps/v1
kind: Deployment
metadata:
  name: app
spec:
  template:
    spec:
      initContainers:
        - name: wait-for-postgres
        - name: copy-public-files
        - name: run-migrations
        - name: cache-warmup
          command:
            - sh
            - -c
            - |
              php bin/console cache:clear --no-warmup
              php bin/console cache:warmup
              php bin/console importmap:install 2>/dev/null || true
              php bin/console ux:icons:warm-cache
              mkdir -p /app/storage/sitemaps
              php bin/console presta:sitemaps:dump /app/storage/sitemaps