CI/CD
Description
CI/CD is the infrastructure repository used to build and publish the shared Docker image for Laravel Enso pipelines.
The repository contains the Dockerfile with the PHP, Composer, Node, Yarn, Redis, and system dependencies required by the build environment, plus the GitLab pipeline definition that builds and pushes the image to the container registry.
It is not a Laravel package. It is a private infrastructure repository used by Enso delivery pipelines.
Installation
There is nothing to install into an application.
To build the image locally:
docker build -t laravel-enso/cicd:php8.2-bookworm .
To run an interactive shell inside the built image:
docker run --rm -it laravel-enso/cicd:php8.2-bookworm bash
Features
- Docker image based on
php:8.2-cli-bookworm. - Installs Node.js 16, Yarn, Composer, Redis, FTP, GD, Intl, Zip, Sodium, and common build utilities.
- Sets CI-oriented PHP defaults such as
memory_limit = 2Gandmax_execution_time = 300. - Uses Docker layer caching by pulling the previously published
php8.2image before build. - Pushes both commit-specific and
php8.2-bookwormtags to the GitLab container registry.
Usage
Use the repository as the source of truth for the shared CI image, or build the image locally when updating the container definition.
The default GitLab flow:
- logs in to the container registry
- pulls the current
php8.2image as cache source - builds the Docker image
- tags it with
$CI_COMMIT_SHAandphp8.2-bookworm - pushes both tags back to the registry
The build job is currently restricted to the php8.2-bookworm branch and runs on the two-cores GitLab runner tag.
API
There is no application API.
Operational surface:
Dockerfile.gitlab-ci.yml
Depends On
Required tools and services:
- Docker ↗
- GitLab CI/CD ↗
- Composer ↗
- Node.js ↗
- Yarn Classic ↗ docs/backend/cicd.md