From de90626e7627e47744f7c92650bc0ef35b162b2c Mon Sep 17 00:00:00 2001 From: Stanislau Kviatkouski <7zete7@gmail.com> Date: Tue, 2 Sep 2025 20:15:09 +0300 Subject: [PATCH 1/5] chore: fix indents in diff code blocks --- docs/makefile.md | 10 +++++--- docs/mysql.md | 66 ++++++++++++++++++++++++------------------------ 2 files changed, 40 insertions(+), 36 deletions(-) diff --git a/docs/makefile.md b/docs/makefile.md index 355f895a5..819a8d365 100644 --- a/docs/makefile.md +++ b/docs/makefile.md @@ -19,12 +19,16 @@ You can also find a more complete example in this [snippet](https://www.strangeb If you want to run make from within the `php` container, in the [Dockerfile](/Dockerfile), add: + + ```diff -gettext \ -git \ -+make \ + gettext \ + git \ ++ make \ ``` + + And rebuild the PHP image. > [!NOTE] diff --git a/docs/mysql.md b/docs/mysql.md index 9d6f96fee..f49b084ea 100644 --- a/docs/mysql.md +++ b/docs/mysql.md @@ -18,31 +18,31 @@ Change the database image to use MySQL instead of PostgreSQL in `compose.yaml`: ```diff -###> doctrine/doctrine-bundle ### -- image: postgres:${POSTGRES_VERSION:-16}-alpine -+ image: mysql:${MYSQL_VERSION:-8} - environment: -- POSTGRES_DB: ${POSTGRES_DB:-app} -+ MYSQL_DATABASE: ${MYSQL_DATABASE:-app} - # You should definitely change the password in production -+ MYSQL_RANDOM_ROOT_PASSWORD: "true" -- POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!} -+ MYSQL_PASSWORD: ${MYSQL_PASSWORD:-!ChangeMe!} -- POSTGRES_USER: ${POSTGRES_USER:-app} -+ MYSQL_USER: ${MYSQL_USER:-app} - healthcheck: -- test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB:-app}", "-U", "${POSTGRES_USER:-app}"] -+ test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] - timeout: 5s - retries: 5 - start_period: 60s - volumes: -- - database_data:/var/lib/postgresql/data:rw -+ - database_data:/var/lib/mysql:rw - # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data! -- # - ./docker/db/data:/var/lib/postgresql/data:rw -+ # - ./docker/db/data:/var/lib/mysql:rw -###< doctrine/doctrine-bundle ### + ###> doctrine/doctrine-bundle ### +- image: postgres:${POSTGRES_VERSION:-16}-alpine ++ image: mysql:${MYSQL_VERSION:-8} + environment: +- POSTGRES_DB: ${POSTGRES_DB:-app} ++ MYSQL_DATABASE: ${MYSQL_DATABASE:-app} + # You should definitely change the password in production ++ MYSQL_RANDOM_ROOT_PASSWORD: "true" +- POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!} ++ MYSQL_PASSWORD: ${MYSQL_PASSWORD:-!ChangeMe!} +- POSTGRES_USER: ${POSTGRES_USER:-app} ++ MYSQL_USER: ${MYSQL_USER:-app} + healthcheck: +- test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB:-app}", "-U", "${POSTGRES_USER:-app}"] ++ test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] + timeout: 5s + retries: 5 + start_period: 60s + volumes: +- - database_data:/var/lib/postgresql/data:rw ++ - database_data:/var/lib/mysql:rw + # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data! +- # - ./docker/db/data:/var/lib/postgresql/data:rw ++ # - ./docker/db/data:/var/lib/mysql:rw + ###< doctrine/doctrine-bundle ### ``` @@ -57,21 +57,21 @@ DATABASE_URL: mysql://${MYSQL_USER:-app}:${MYSQL_PASSWORD:-!ChangeMe!}@database: Since we changed the port, we also have to define this in the `compose.override.yaml`: ```diff -###> doctrine/doctrine-bundle ### - database: - ports: -- - "5432" -+ - "3306" -###< doctrine/doctrine-bundle ### + ###> doctrine/doctrine-bundle ### + database: + ports: +- - "5432" ++ - "3306" + ###< doctrine/doctrine-bundle ### ``` Last but not least, we need to install the MySQL driver in `Dockerfile`: ```diff -###> doctrine/doctrine-bundle ### + ###> doctrine/doctrine-bundle ### -RUN install-php-extensions pdo_pgsql +RUN install-php-extensions pdo_mysql -###< doctrine/doctrine-bundle ### + ###< doctrine/doctrine-bundle ### ``` ## Change Environment From d1e679a4589f843de47518792e9634ff1c8c6b37 Mon Sep 17 00:00:00 2001 From: Stanislau Kviatkouski <7zete7@gmail.com> Date: Tue, 2 Sep 2025 20:16:10 +0300 Subject: [PATCH 2/5] chore: replace patch by diff code blocks --- docs/alpine.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/alpine.md b/docs/alpine.md index d165359ad..587009f41 100644 --- a/docs/alpine.md +++ b/docs/alpine.md @@ -10,7 +10,7 @@ To switch to Alpine-based images, apply the following changes to the `Dockerfile -```patch +```diff -FROM dunglas/frankenphp:1-php8.4 AS frankenphp_upstream +FROM dunglas/frankenphp:1-php8.4-alpine AS frankenphp_upstream From 58eee289269011a616f1bfd31c24caf7d707c040 Mon Sep 17 00:00:00 2001 From: Stanislau Kviatkouski <7zete7@gmail.com> Date: Tue, 2 Sep 2025 20:30:40 +0300 Subject: [PATCH 3/5] chore: fix missed punctuation in docs --- docs/extra-services.md | 2 +- docs/mysql.md | 2 +- docs/options.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/extra-services.md b/docs/extra-services.md index 683bd95fd..72fccdab7 100644 --- a/docs/extra-services.md +++ b/docs/extra-services.md @@ -22,4 +22,4 @@ The currently supported packages are: > [!WARNING] > > We recommend that you use the `composer require` command inside the container -> in development mode so that recipes can be applied correctly +> in development mode so that recipes can be applied correctly. diff --git a/docs/mysql.md b/docs/mysql.md index f49b084ea..cf068b463 100644 --- a/docs/mysql.md +++ b/docs/mysql.md @@ -48,7 +48,7 @@ Change the database image to use MySQL instead of PostgreSQL in `compose.yaml`: Depending on the database configuration, -modify the environment in the same file at `services.php.environment.DATABASE_URL` +modify the environment in the same file at `services.php.environment.DATABASE_URL`: ```yaml DATABASE_URL: mysql://${MYSQL_USER:-app}:${MYSQL_PASSWORD:-!ChangeMe!}@database:3306/${MYSQL_DATABASE:-app}?serverVersion=${MYSQL_VERSION:-8}&charset=${MYSQL_CHARSET:-utf8mb4} diff --git a/docs/options.md b/docs/options.md index fea2e11de..fae653369 100644 --- a/docs/options.md +++ b/docs/options.md @@ -71,7 +71,7 @@ to inject options block, directive or configuration. > [!TIP] > > All the following environment variables can be defined in your `.env` file -> at the root of the project to keep them persistent at each startup +> at the root of the project to keep them persistent at each startup. From d7d2af171bc9970f09dbf6ec16a22e168d8fe71c Mon Sep 17 00:00:00 2001 From: Stanislau Kviatkouski <7zete7@gmail.com> Date: Tue, 2 Sep 2025 20:31:28 +0300 Subject: [PATCH 4/5] chore: fix markdownlint-enable comment indent in docs/tls.md --- docs/tls.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tls.md b/docs/tls.md index 0e7d88f50..e8974f7c8 100644 --- a/docs/tls.md +++ b/docs/tls.md @@ -53,7 +53,7 @@ do as follows: mkcert -cert-file frankenphp/certs/tls.pem -key-file frankenphp/certs/tls.key "server-name.localhost" ``` - + 4. Add these lines to the `./compose.override.yaml` file about `CADDY_SERVER_EXTRA_DIRECTIVES` environment and volume for the `php` service: From 261069445422262040304d716af87fc72d9d1162 Mon Sep 17 00:00:00 2001 From: Stanislau Kviatkouski <7zete7@gmail.com> Date: Tue, 2 Sep 2025 20:31:54 +0300 Subject: [PATCH 5/5] chore: fix typos in docs --- docs/troubleshooting.md | 2 +- docs/xdebug.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index d2fde1f43..3e59a22b5 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -73,7 +73,7 @@ This means you have to run the following command in order to build your image: docker compose -f compose.yaml -f compose.prod.yaml build --pull --no-cache ``` -> [!WARINING] +> [!WARNING] > > The order of `-f` arguments matters. diff --git a/docs/xdebug.md b/docs/xdebug.md index 362c5517d..5a3927c86 100644 --- a/docs/xdebug.md +++ b/docs/xdebug.md @@ -79,7 +79,7 @@ You can now use the debugger! ``` 3. Use [Run and Debug](https://code.visualstudio.com/docs/debugtest/debugging#_start-a-debugging-session) - options and run `Listen for Xdebug` command to listen for upcomming connections + options and run `Listen for Xdebug` command to listen for upcoming connections with [the **Xdebug extension**](https://xdebug.org/docs/step_debug#browser-extensions) installed and active.