Skip to content

Commit 2e80583

Browse files
committed
Add examples.
1 parent 1ace3ed commit 2e80583

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ If the file physically exists on filesystem it is served by nginx.
77
If file not present Nginx proxy a request to PHP-FPM.
88
There must be a `app.php` inside the folder.
99

10-
```
11-
docker run --rm -it --env NGINX_WEB_ROOT=/app/web -p 80:80 -v /home/user/app/:/app makasim/nginx-php-fpm
10+
```bash
11+
echo "<?php phpinfo();" > app.php
12+
echo "<h1>Hello world</h1>" > hello.html
13+
14+
docker run -d -p 8080:80 -v `pwd`:/var/www/html formapro/nginx-php-fpm
15+
16+
curl -X GET localhost:8080 # runs app.php and outputs phpinfo
17+
curl -X GET localhost:8080/hello.html # shows Hello world
1218
```
1319

1420
## Env vars
@@ -28,3 +34,4 @@ PHP_GROUP= www-data
2834
PHP_MODE= 0660
2935
PHP_FPM_CONF= /etc/php/7.0/fpm/php-fpm.conf
3036
```
37+

0 commit comments

Comments
 (0)