Skip to content

Migrate from PHP-FPM to Laravel Octane for Docker-native HTTP serving #2

Description

@aquarion

Context

Alchemistic is currently deployed as a PHP-FPM container exposing port 9000. The host nginx does fastcgi_pass to that port and handles SSL termination. This means Alchemistic requires a host-nginx vhost to be functional and cannot be routed directly by Traefik.

We're migrating firth's Docker infrastructure to use Traefik as the reverse proxy. Traefik routes HTTP, not FastCGI — so services need to serve HTTP directly to participate.

What needs to change

Switch from PHP-FPM to Laravel Octane (FrankenPHP recommended, or Swoole) so the container serves HTTP on port 8000.

App changes

  • composer require laravel/octane
  • php artisan octane:install (choose FrankenPHP or Swoole)
  • Update Dockerfile to use the FrankenPHP base image or install Swoole extension
  • Set OCTANE_SERVER env var accordingly

Infrastructure changes (in autopelago — tracked separately)

Once the image serves HTTP:

  • Remove firth_alchemistic_fpm_port variable
  • Remove the "Deploy Alchemistic nginx vhost" task block from roles/firth_alchemistic/tasks/main.yml
  • Update roles/firth_alchemistic/templates/docker-compose.yml.j2 to add Traefik labels and join the traefik Docker network instead of publishing a FPM port

Precedent

stream-delta already uses Octane on this infrastructure, so the deployment pattern is established.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions