Skip to content

Commit 84aac83

Browse files
authored
chore: cleaning up the docs (#837)
* chore: fix indents in diff code blocks * chore: replace patch by diff code blocks * chore: fix missed punctuation in docs * chore: fix markdownlint-enable comment indent in docs/tls.md * chore: fix typos in docs
1 parent afd9810 commit 84aac83

File tree

8 files changed

+47
-43
lines changed

8 files changed

+47
-43
lines changed

docs/alpine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To switch to Alpine-based images, apply the following changes to the `Dockerfile
1010

1111
<!-- markdownlint-disable MD010 -->
1212

13-
```patch
13+
```diff
1414
-FROM dunglas/frankenphp:1-php8.4 AS frankenphp_upstream
1515
+FROM dunglas/frankenphp:1-php8.4-alpine AS frankenphp_upstream
1616

docs/extra-services.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ The currently supported packages are:
2222
> [!WARNING]
2323
>
2424
> We recommend that you use the `composer require` command inside the container
25-
> in development mode so that recipes can be applied correctly
25+
> in development mode so that recipes can be applied correctly.

docs/makefile.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@ You can also find a more complete example in this [snippet](https://www.strangeb
1919
If you want to run make from within the `php` container, in the [Dockerfile](/Dockerfile),
2020
add:
2121

22+
<!-- markdownlint-disable MD010 -->
23+
2224
```diff
23-
gettext \
24-
git \
25-
+make \
25+
gettext \
26+
git \
27+
+ make \
2628
```
2729

30+
<!-- markdownlint-enable MD010 -->
31+
2832
And rebuild the PHP image.
2933

3034
> [!NOTE]

docs/mysql.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,37 @@ Change the database image to use MySQL instead of PostgreSQL in `compose.yaml`:
1818
<!-- markdownlint-disable MD013 -->
1919

2020
```diff
21-
###> doctrine/doctrine-bundle ###
22-
- image: postgres:${POSTGRES_VERSION:-16}-alpine
23-
+ image: mysql:${MYSQL_VERSION:-8}
24-
environment:
25-
- POSTGRES_DB: ${POSTGRES_DB:-app}
26-
+ MYSQL_DATABASE: ${MYSQL_DATABASE:-app}
27-
# You should definitely change the password in production
28-
+ MYSQL_RANDOM_ROOT_PASSWORD: "true"
29-
- POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}
30-
+ MYSQL_PASSWORD: ${MYSQL_PASSWORD:-!ChangeMe!}
31-
- POSTGRES_USER: ${POSTGRES_USER:-app}
32-
+ MYSQL_USER: ${MYSQL_USER:-app}
33-
healthcheck:
34-
- test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB:-app}", "-U", "${POSTGRES_USER:-app}"]
35-
+ test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
36-
timeout: 5s
37-
retries: 5
38-
start_period: 60s
39-
volumes:
40-
- - database_data:/var/lib/postgresql/data:rw
41-
+ - database_data:/var/lib/mysql:rw
42-
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
43-
- # - ./docker/db/data:/var/lib/postgresql/data:rw
44-
+ # - ./docker/db/data:/var/lib/mysql:rw
45-
###< doctrine/doctrine-bundle ###
21+
###> doctrine/doctrine-bundle ###
22+
- image: postgres:${POSTGRES_VERSION:-16}-alpine
23+
+ image: mysql:${MYSQL_VERSION:-8}
24+
environment:
25+
- POSTGRES_DB: ${POSTGRES_DB:-app}
26+
+ MYSQL_DATABASE: ${MYSQL_DATABASE:-app}
27+
# You should definitely change the password in production
28+
+ MYSQL_RANDOM_ROOT_PASSWORD: "true"
29+
- POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}
30+
+ MYSQL_PASSWORD: ${MYSQL_PASSWORD:-!ChangeMe!}
31+
- POSTGRES_USER: ${POSTGRES_USER:-app}
32+
+ MYSQL_USER: ${MYSQL_USER:-app}
33+
healthcheck:
34+
- test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB:-app}", "-U", "${POSTGRES_USER:-app}"]
35+
+ test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
36+
timeout: 5s
37+
retries: 5
38+
start_period: 60s
39+
volumes:
40+
- - database_data:/var/lib/postgresql/data:rw
41+
+ - database_data:/var/lib/mysql:rw
42+
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
43+
- # - ./docker/db/data:/var/lib/postgresql/data:rw
44+
+ # - ./docker/db/data:/var/lib/mysql:rw
45+
###< doctrine/doctrine-bundle ###
4646
```
4747

4848
<!-- markdownlint-enable MD013 -->
4949

5050
Depending on the database configuration,
51-
modify the environment in the same file at `services.php.environment.DATABASE_URL`
51+
modify the environment in the same file at `services.php.environment.DATABASE_URL`:
5252

5353
```yaml
5454
DATABASE_URL: mysql://${MYSQL_USER:-app}:${MYSQL_PASSWORD:-!ChangeMe!}@database:3306/${MYSQL_DATABASE:-app}?serverVersion=${MYSQL_VERSION:-8}&charset=${MYSQL_CHARSET:-utf8mb4}
@@ -57,21 +57,21 @@ DATABASE_URL: mysql://${MYSQL_USER:-app}:${MYSQL_PASSWORD:-!ChangeMe!}@database:
5757
Since we changed the port, we also have to define this in the `compose.override.yaml`:
5858

5959
```diff
60-
###> doctrine/doctrine-bundle ###
61-
database:
62-
ports:
63-
- - "5432"
64-
+ - "3306"
65-
###< doctrine/doctrine-bundle ###
60+
###> doctrine/doctrine-bundle ###
61+
database:
62+
ports:
63+
- - "5432"
64+
+ - "3306"
65+
###< doctrine/doctrine-bundle ###
6666
```
6767

6868
Last but not least, we need to install the MySQL driver in `Dockerfile`:
6969

7070
```diff
71-
###> doctrine/doctrine-bundle ###
71+
###> doctrine/doctrine-bundle ###
7272
-RUN install-php-extensions pdo_pgsql
7373
+RUN install-php-extensions pdo_mysql
74-
###< doctrine/doctrine-bundle ###
74+
###< doctrine/doctrine-bundle ###
7575
```
7676

7777
## Change Environment

docs/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ to inject options block, directive or configuration.
7171
> [!TIP]
7272
>
7373
> All the following environment variables can be defined in your `.env` file
74-
> at the root of the project to keep them persistent at each startup
74+
> at the root of the project to keep them persistent at each startup.
7575
7676
<!-- markdownlint-disable MD013 -->
7777

docs/tls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ do as follows:
5353
mkcert -cert-file frankenphp/certs/tls.pem -key-file frankenphp/certs/tls.key "server-name.localhost"
5454
```
5555

56-
<!-- markdownlint-enable MD013 -->
56+
<!-- markdownlint-enable MD013 -->
5757

5858
4. Add these lines to the `./compose.override.yaml` file about `CADDY_SERVER_EXTRA_DIRECTIVES`
5959
environment and volume for the `php` service:

docs/troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ This means you have to run the following command in order to build your image:
7373
docker compose -f compose.yaml -f compose.prod.yaml build --pull --no-cache
7474
```
7575

76-
> [!WARINING]
76+
> [!WARNING]
7777
>
7878
> The order of `-f` arguments matters.
7979

docs/xdebug.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ You can now use the debugger!
7979
```
8080

8181
3. Use [Run and Debug](https://code.visualstudio.com/docs/debugtest/debugging#_start-a-debugging-session)
82-
options and run `Listen for Xdebug` command to listen for upcomming connections
82+
options and run `Listen for Xdebug` command to listen for upcoming connections
8383
with [the **Xdebug extension**](https://xdebug.org/docs/step_debug#browser-extensions)
8484
installed and active.
8585

0 commit comments

Comments
 (0)