A dockerized environment based on Caddy + PHP-FPM running on a Linux Alpine container.
[TOC]
This repository contains a dockerized environment for building PHP applications based on php:8.3.12-fpm-alpine with Caddy support.
- Unified environment to build CLI, web applications and/or micro-services based on PHP8.
- Multi-stage Dockerfile to allows you to create an optimized development or production-ready Docker images
- Uses Caddy webserver.
- PHP-FPM is managed by Caddy.
- Everything in one single Docker service.
To use this repository you need:
- Docker - An open source containerization platform.
- Git - The free and open source distributed version control system.
- Make - A command to automate the build/manage process.
- jq - A lightweight and flexible command-line JSON processor.
Type | Component | Description |
---|---|---|
Infrastructure | Docker | Containerization platform |
Service | Caddy Server | Open source web server with automatic HTTPS written in Go |
Service | Caddy Supervisor | A module to run and supervise background processes from Caddy |
Service | PHP-FPM | PHP with FastCGI Process Manager |
Miscelaneous | Bash | Allows to create an interactive shell within containerized service |
Miscelaneous | Make | Allows to execute commands defined on a Makefile |
Miscelaneous | jq | Allows to beautify the Docker inspections in JSON format |
Important
This development environment is based on Dockerized PHP, a framework agnostic dockerized environment to create and deploy PHP applications.
Please take a look to the README.md file to know how to familiarize with it and get up and running.
Important
Default application is based on PHP Skeleton, a minimalistic boilerplate to create PHP applications from scratch.
Please take a look to the README.md file to know how to familiarize with it and get up and running.
Just clone the repository into your preferred path:
$ mkdir -p ~/path/to/my-new-project && cd ~/path/to/my-new-project
$ git clone [email protected]:alcidesrc/dockerized-php-caddy.git .
$ make init
$ make build
$ make up
$ make install-caddy-certificate
$ make open-website
$ make down
Please review our security policy on how to report security vulnerabilities:
PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY
Only the latest major version receives security fixes.
If you discover a security vulnerability within this project, please open an issue here. All security vulnerabilities will be promptly addressed.
The MIT License (MIT). Please see LICENSE file for more information.