Skip to content

udx/worker-php

Repository files navigation

UDX Worker PHP

UDX Worker PHP

Docker Pulls GitHub Release License

PHP runtime image built on UDX Worker with NGINX and PHP-FPM wired for /var/www.

Quick Start - Runtime - Development - Deployment - Rabbit CI

Overview

udx-worker-php extends udx/worker, published as usabilitydynamics/udx-worker, and keeps the worker runtime model while adding a PHP web stack:

  • NGINX serves /var/www.
  • PHP-FPM runs behind NGINX through a Unix socket.
  • PHP CLI and common extensions are installed for application and automation workloads.
  • Worker service definitions start both php-fpm and nginx.

Use this image as a base for PHP applications, automation jobs, or deployment workflows that need the Worker runtime contract.

Quick Start

Requirements: Docker. Make is optional but recommended for local development.

Run the published image:

docker run -d \
  --name my-php-app \
  -p 8080:80 \
  -v "$(pwd)/my-php-app:/var/www" \
  usabilitydynamics/udx-worker-php:latest

Then open http://localhost:8080.

Build and run locally:

git clone https://github.com/udx/worker-php.git
cd worker-php

make build
make run HOST_PORT=8080
make log FOLLOW_LOGS=true

make run uses defaults from Makefile.variables, including ./src/scripts:/var/www, .env, and container port 80.

This image does not require default environment variables. Runtime environment values and secret references belong in worker.yaml or the target platform.

Runtime

The runtime contract is defined by the Dockerfile and the configs copied into the image:

  • Dockerfile pins the base Worker image and Ubuntu package versions.
  • etc/configs/nginx/ defines the NGINX server and PHP FastCGI integration.
  • etc/configs/php/ defines PHP-FPM process and pool behavior.
  • etc/configs/worker/services.yaml declares Worker-managed services.

/var/www is both the declared volume and working directory. NGINX sends PHP requests to the PHP-FPM Unix socket configured during the image build.

Development

Common commands:

make help
make build
make run HOST_PORT=8080
make exec
make log
make clean

Run all validation:

make test

Run only the container test suite against an already built image:

make run-all-tests

Run one test script:

make run-test TEST_SCRIPT=10_nginx_test.php

Current tests live in src/tests/ and cover NGINX HTTP response, PHP runtime availability, PHP CLI execution, and write permissions under /var/www.

Deployment

Deployment uses the host-native tool for the target environment. Mount application code at /var/www and publish container port 80 through the platform.

The GitHub release pipeline is declared in .github/workflows/docker-ops.yml and delegates Docker publishing to udx/reusable-workflows.

For dependency upgrades, include the changed base image/packages and the local verification result in the PR description.

Worker Config

worker.yaml follows the base Worker config contract for runtime config.env values and config.secrets references. Deployment environment variables override values declared in worker.yaml.

See docs/worker-config.md for the local config reference.

References:

Rabbit CI

Rabbit-facing repo context lives in .rabbit/. This image repo publishes the worker-php Docker image; it does not own tenant-specific Rabbit lifecycle manifests.

See .rabbit/README.md for Rabbit CI entry points, delivery notes, and generated repo context handling.

Resources

License

MIT. See LICENSE.

About

UDX Worker for running PHP applications.

Resources

License

Security policy

Stars

2 stars

Watchers

5 watching

Forks

Packages

 
 
 

Contributors