php-stack

by Makaira GmbH

Helm chartv3.1.0App 0.0.0

About this chart

php-stack

This Chart provides an all in one solution for PHP microservices used at Makaira. This includes:

  • define extra deployments (for e.g. worker processes)
  • define cronjobs (for repeated tasks such as db cleanups)
  • a migration helm hook to migrate the database to the newest schema version (by default the symfony/doctrine command for migrations is used)
  • the MariaDB helm chart from Bitnami
  • a backup cronjob to backup the database
  • defaults that are useful for PHP microservices (using port 80 for Apache2, www-data user by default)
  • hardened pod and containers
    • by dropping unnecessary capabilities (e.g. AUDIT_WRITE, SETPCAP, FOWNER) NET_BIND_SERVICE is still enabled to allow port 80 for Apache2
    • by defining podSecurityContext without root privileges and 33 as user and group
    • by disabling enableServiceLinks and automountServiceAccountToken

Deploy php-stack with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has php-stack on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartphp-stack is pinned at v3.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply