feat(supported-version): add service_preferences and support for php-fpm and nginx (#255)

This commit is contained in:
Damien Retzinger
2026-05-17 15:51:05 -04:00
parent 8e82fcc893
commit e89f6ad2e0
16 changed files with 642 additions and 47 deletions
@@ -80,4 +80,29 @@ export const valkeyConfig: ServiceTemplate = {
ports: ['6379:6379']
};
}
};
};
/**
* Builds the nginx service config for the web tier. Takes the image
* (sourced from the matrix entry's `nginx` field) and the runner
* workspace path so the volume mount lands the Magento install at
* `/var/www/html` inside the container. Pairs with `buildPhpFpmConfig`
* — they're emitted together as the web tier.
*/
export const buildNginxConfig = (image: string, workspace: string): ServiceConfig => ({
image,
ports: ['80:80'],
volumes: [`${workspace}:/var/www/html`],
options: '--health-cmd "nginx -t" --health-interval=10s --health-retries=3 --health-timeout=5s --health-start-period=5s'
});
/**
* Builds the php-fpm service config for the web tier. Composes the
* image from the matrix entry's `php` version (the mappia magento-php
* image stream is the only widely-used Magento-aware php-fpm image).
* Pairs with `buildNginxConfig`.
*/
export const buildPhpFpmConfig = (phpVersion: string, workspace: string): ServiceConfig => ({
image: `mappia/magento-php:fpm-alpine${phpVersion}`,
volumes: [`${workspace}:/var/www/html`]
});