Skip to content
Menu

Install#

This page gets you from a clean machine to a built gateway image with Docker, or to the published image from the registry.

Requirements#

You need Docker and nothing else. The PHP component needs PHP 8.3 or newer and Composer, and these steps run both inside the composer:2.11.1 container. composer.json requires PHP ^8.3 and the ext-openssl extension; the runtime libraries are lcobucci/jwt, psr/clock, symfony/console, symfony/yaml and promphp/prometheus_client_php.

Install#

The commands below clone the repository, install the dependencies, copy the example config and environment file, validate the config and build the gateway image. With PHP installed locally the same commands are composer install and php bin/drawbridge ....

PowerShell

git clone https://git.wayne.edu/enterprise-apps/drawbridge.git; cd drawbridge
docker run --rm -v "${PWD}:/app" -w /app composer:2.11.1@sha256:8de2184c6de224f4689e8f80ed5f5edaf0030b6b8b7839a22a2bcb6722ac87d0 composer install --no-interaction
Copy-Item .env.example .env
Copy-Item config\drawbridge.example.yaml config\drawbridge.yaml
docker run --rm -v "${PWD}:/app" -w /app composer:2.11.1@sha256:8de2184c6de224f4689e8f80ed5f5edaf0030b6b8b7839a22a2bcb6722ac87d0 php bin/drawbridge config:validate --config=config/drawbridge.yaml
docker build -f docker/gateway/Dockerfile -t drawbridge-gateway .

sh

git clone https://git.wayne.edu/enterprise-apps/drawbridge.git && cd drawbridge
docker run --rm -v "$PWD:/app" -w /app composer:2.11.1@sha256:8de2184c6de224f4689e8f80ed5f5edaf0030b6b8b7839a22a2bcb6722ac87d0 composer install --no-interaction
cp .env.example .env
cp config/drawbridge.example.yaml config/drawbridge.yaml
docker run --rm -v "$PWD:/app" -w /app composer:2.11.1@sha256:8de2184c6de224f4689e8f80ed5f5edaf0030b6b8b7839a22a2bcb6722ac87d0 php bin/drawbridge config:validate --config=config/drawbridge.yaml
docker build -f docker/gateway/Dockerfile -t drawbridge-gateway .

Getting the image#

Instead of building, pull the published image. The pipeline builds the gateway image on every merge request and on the default branch, and publishes it to the stack's image registry (the group's images project) when a tag is pushed. The image is at <registry>/enterprise-apps/images/drawbridge-gateway:<tag> (for example <registry>/enterprise-apps/images/drawbridge-gateway:0.6.2). <registry> is the stack's container registry; Enterprise Applications has its address.

docker pull <registry>/enterprise-apps/images/drawbridge-gateway:0.6.2

The image carries OCI labels (org.opencontainers.image.source, .revision, .version, .licenses) set from the pipeline's commit; a local docker build leaves them empty.

Verify#

The publish job prints the digest it pushed. Verify the image you pulled against it:

docker inspect --format='{{index .RepoDigests 0}}' <registry>/enterprise-apps/images/drawbridge-gateway:0.6.2

The command prints the digest of the image you pulled; compare it with the digest the publish job printed.

Next steps#