Skip to content

Commit 35611fc

Browse files
author
Marc Wolf
committed
[TASK] Update README.md
1 parent c59280e commit 35611fc

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

.github/workflows/docker-compose-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
4747
- name: Run PHPUnit tests
4848
run: |
49-
docker-compose exec -T php-fpm ./vendor/bin/phpunit tests --colors
49+
docker-compose exec -T php-fpm ./vendor/bin/phpunit tests
5050
5151
- name: Test Redis
5252
run: |

README.md

+46-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Docker compose PHP 8.3.8, Xdebug 3.4.0, Nginx 1.27.0, Redis 7.2.5 and MariaDB 11.4.2
22

33
![docker](https://img.shields.io/badge/Docker-compose-brightgreen.svg)
4+
![nginx](https://img.shields.io/badge/nginx-1.27.0-brightgreen.svg)
45
![php](https://img.shields.io/badge/PHP_FPM-8.3.8-brightgreen.svg)
56
![xdebug](https://img.shields.io/badge/Xdebug-3.3.2-brightgreen.svg)
6-
![nginx](https://img.shields.io/badge/nginx-1.27.0-brightgreen.svg)
7+
![phpunit](https://img.shields.io/badge/PHPUnit-11.2.1-brightgreen.svg)
78
![redis](https://img.shields.io/badge/Redis-7.2.5-brightgreen.svg)
89
![mariadb](https://img.shields.io/badge/MariaDB-11.4.2-brightgreen.svg)
910

@@ -12,8 +13,52 @@
1213
* And [composer the dependency manager for PHP](https://getcomposer.org) to start easy your project
1314
* Built on the lightweight [nginx 1.27.0](https://nginx.org) webserver
1415
* Debugging with [Xdebug 3.3.2](https://xdebug.org)
16+
* Testing with [PHPUnit 11.2.1](https://phpunit.de) to ensure code quality and reliability
1517
* [Redis 7.2.5](https://redis.io) as session storage, database, cache, streaming engine, and message broker
1618
* Database storage with [MariaDB 11.4.2](https://mariadb.org)
1719

20+
## Setup Instructions
21+
22+
1. **Clone the repository:**
23+
```sh
24+
git clone https://github.com/IshtarStar/docker-compose-nginx-phpfpm-xdebug-mariadb.git ./docker-skeleton
25+
cd docker-skeleton
26+
```
27+
28+
2. **Build and start the Docker containers:**
29+
```sh
30+
docker-compose up --build -d
31+
```
32+
33+
3. **Install Composer dependencies:**
34+
```sh
35+
docker-compose exec -T php-fpm composer install
36+
```
37+
38+
4. **Run PHPUnit tests:**
39+
```sh
40+
docker-compose exec -T php-fpm ./vendor/bin/phpunit tests
41+
```
42+
43+
## Example PHPUnit Test
44+
45+
An example PHPUnit test is included in the `tests` directory:
46+
47+
```php
48+
// tests/ExampleTest.php
49+
50+
<?php
51+
52+
use PHPUnit\Framework\TestCase;
53+
54+
class ExampleTest extends TestCase
55+
{
56+
public function testExample()
57+
{
58+
$this->assertTrue(true);
59+
}
60+
}
61+
```
62+
1863
See also:
1964
[Blog-Post: Dockerize your PHP application with Nginx and PHP8 FPM](https://marc.it/dockerize-application-with-nginx-and-php8/)

0 commit comments

Comments
 (0)