Production-ready PHP container image based on Debian, tailored for Laravel Vapor & Twill CMS
- Use Debian stable as base for environment parity (following Twelve-Factor App)
- Use Docker's official PHP images with minor customizations
- Be slim as much as possible
- Be frequently updated using GitHub Actions
This project does not aim to:
- Be used for development (see hydrofoil-php instead)
- Be compatible with environments other than Laravel Vapor (may or may not work)
- Be everything but the kitchen sink
This project aims to be used in production, as the configuration settings have been tweaked specifically for that purpose and for Laravel Vapor.
Tested and tuned to work with Twill CMS, leaving to you to bring
only your application packages and be able to deploy seamless from your
console with vapor deploy
or your CI environment.
Please note that this image does not contain any development tools like Composer, NodeJS or Yarn, as those should be used before to generate the needed artifacts that will be integrated within the final image.
You will need a working installation of Docker on your machine or
the CI environment used when vapor deploy
is invoked.
Update your vapor.yml
configuration file indicating to use Docker runtime,
like this example:
name: vapor-laravel-app
environments:
production:
- runtime: 'php-8.0:al2'
+ runtime: docker
build:
- 'composer install --no-dev'
Next, create a Dockerfile for that environment, following Vapor's conventions
and naming the file production.Dockerfile
:
FROM ghcr.io/luislavena/greek-steam:8.2
# Place application in Lambda application directory...
COPY . /var/task
With that in place, your next vapor deploy
for that environment will use
this configuration and deploy based on the new runtime selected.
Refer to Laravel Vapor's own documentation about
Docker runtimes for details on using Docker and a
local Dockerfile
.
This project is open to code contributions for bug fixes only. Features carry a long-term maintenance burden so they will not be accepted at this time. Please submit an issue if you have a feature you'd like to request or discuss.