Skip to content

Commit

Permalink
[TASK] Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Wolf committed Jun 11, 2024
1 parent c59280e commit 35611fc
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Run PHPUnit tests
run: |
docker-compose exec -T php-fpm ./vendor/bin/phpunit tests --colors
docker-compose exec -T php-fpm ./vendor/bin/phpunit tests
- name: Test Redis
run: |
Expand Down
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Docker compose PHP 8.3.8, Xdebug 3.4.0, Nginx 1.27.0, Redis 7.2.5 and MariaDB 11.4.2

![docker](https://img.shields.io/badge/Docker-compose-brightgreen.svg)
![nginx](https://img.shields.io/badge/nginx-1.27.0-brightgreen.svg)
![php](https://img.shields.io/badge/PHP_FPM-8.3.8-brightgreen.svg)
![xdebug](https://img.shields.io/badge/Xdebug-3.3.2-brightgreen.svg)
![nginx](https://img.shields.io/badge/nginx-1.27.0-brightgreen.svg)
![phpunit](https://img.shields.io/badge/PHPUnit-11.2.1-brightgreen.svg)
![redis](https://img.shields.io/badge/Redis-7.2.5-brightgreen.svg)
![mariadb](https://img.shields.io/badge/MariaDB-11.4.2-brightgreen.svg)

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

## Setup Instructions

1. **Clone the repository:**
```sh
git clone https://github.com/IshtarStar/docker-compose-nginx-phpfpm-xdebug-mariadb.git ./docker-skeleton
cd docker-skeleton
```

2. **Build and start the Docker containers:**
```sh
docker-compose up --build -d
```

3. **Install Composer dependencies:**
```sh
docker-compose exec -T php-fpm composer install
```

4. **Run PHPUnit tests:**
```sh
docker-compose exec -T php-fpm ./vendor/bin/phpunit tests
```

## Example PHPUnit Test

An example PHPUnit test is included in the `tests` directory:

```php
// tests/ExampleTest.php

<?php

use PHPUnit\Framework\TestCase;

class ExampleTest extends TestCase
{
public function testExample()
{
$this->assertTrue(true);
}
}
```

See also:
[Blog-Post: Dockerize your PHP application with Nginx and PHP8 FPM](https://marc.it/dockerize-application-with-nginx-and-php8/)

0 comments on commit 35611fc

Please sign in to comment.