Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
default: up

up:
docker-compose up

down:
docker-compose down

build:
docker-compose down -v --remove-orphans
docker-compose rm -vsf
docker-compose up -d --build

list:
docker ps

lf:
docker logs -f fluent-bit-cn

lp:
docker logs php-fpm

p:
docker-compose exec php sh
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,30 @@ with [FrankenPHP](https://frankenphp.dev) and [Caddy](https://caddyserver.com/)
4. Open `https://localhost` in your favorite web browser and [accept the auto-generated TLS certificate](https://stackoverflow.com/a/15076602/1352334)
5. Run `docker compose down --remove-orphans` to stop the Docker containers.

## Makefile Usage Instructions

This project includes a `Makefile` to simplify common Docker and Docker Compose operations. Below are the available commands and their descriptions.

### Prerequisites

- `make` (usually preinstalled on Linux/macOS; available via package managers on Windows like WSL or Cygwin)

---

### Available Commands

| Command | Description |
|---------------------|----------------------------------------------------------------------------------------------------|
| `make` or `make up` | Start all containers in foreground (with logs). |
| `make down` | Stop and remove all containers, networks, and volumes. |
| `make build` | Clean up previous containers and volumes, then rebuild images and start services in detached mode. |
| `make list` | List all running Docker containers. |
| `make lf` | Follow logs from the `fluent-bit-cn` container (streaming). |
| `make lp` | Show logs from the `php-fpm` container. |
| `make p` | Open a shell inside the running `php` container (useful for debugging, running commands, etc.). |

---

## Features

- Production, development and CI ready
Expand Down