Skip to content

tom00/shopware-kubernetes-dev

Repository files navigation

New Shopware-Kube Concept WiP

This concept is to test out Shopware PHP static build and compiled in application. All in a single binary. It is based on FrankenPHP and static-php-cli projects. Note that a static binary is built for production environments only. The dev version is based on dunglas/frankenphp image, because of inability to install xdebug in the binary version.

Build

Build dev image

docker build --target=app-dev --progress=plain -t shopware-bin-dev .

Build production image

docker build --target=app-prod --progress=plain -t shopware-bin .

Start

PHP Server

Production:

docker run --rm --name=shopware-bin -p 8000:8000 shopware-bin php-server -l 0.0.0.0:8000 -a -v --no-compress 

Development:

docker run --rm --name=shopware-bin -p 8000:8000 shopware-bin-dev php-server -l 0.0.0.0:8000 -a -v --no-compress 

PHP-cli

docker run --rm --name=shopware-bin shopware-bin php-cli bin/console

Configure Kubernetes cluster

Shopware cluster requires the following components to be available upfront:

  • Ingress controller (e.g. NGINX Ingress Controller, Traefik or HAProxy).
  • S3 compatible storage (e.g. MinIO).
  • Secret generator to automatically generate passwords.
  • Sealed secrets to encrypt secrets and store encrypted in the repository.

MinIO public readonly policy

{
    "Version": "2012-10-17",
    "Statement": [

      {
        "Action": [
          "s3:GetBucketLocation",
          "s3:ListBucket"
        ],
        "Effect": "Allow",
        "Principal": {
          "AWS": [
            "*"
          ]
        },
        "Resource": [
          "arn:aws:s3:::public"
        ],
        "Sid": ""
      },
      {
        "Action": [
          "s3:GetObject"
        ],
        "Effect": "Allow",
        "Principal": {
          "AWS": [
            "*"
          ]
        },
        "Resource": [
          "arn:aws:s3:::public/*"
        ],
        "Sid": ""
      }        
    ]
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published