Add a docker-compose configuration to try to reproduce #386

This commit is contained in:
Stéphane Goetz 2016-08-05 23:10:23 +02:00
parent 6837b28e03
commit 594ee68ca6
4 changed files with 73 additions and 0 deletions

View File

@ -368,6 +368,17 @@ The `web.config` needs an entry for `<rewrite>` under `<system.webServer>`:
To use clean URLs on IIS 6, you will need to use a custom URL rewrite module, such as [URL Rewriter](http://urlrewriter.net/).
## Docker
A docker configuration is also provided to run daux within a container, you can either run daux with php5 or php7.
```
cd docker
docker-compose -f docker-compose.7.yml up -d
```
You can then point your browser to http://localhost:8086
## Compatibility
Daux.io is compatible with PHP 5.5 and up.

View File

@ -0,0 +1,18 @@
version: '2'
services:
nginx:
image: nginx
ports:
- 8086:80
volumes:
- ../:/var/www:ro
- ./nginx_default.conf:/etc/nginx/conf.d/default.conf
links:
- phpserver
phpserver:
image: php:5-fpm
working_dir: /var/www/
volumes:
- ../:/var/www/

View File

@ -0,0 +1,18 @@
version: '2'
services:
nginx:
image: nginx
ports:
- 8086:80
volumes:
- ../:/var/www:ro
- ./nginx_default.conf:/etc/nginx/conf.d/default.conf
links:
- phpserver
phpserver:
image: php:7.0-fpm
working_dir: /var/www/
volumes:
- ../:/var/www/

26
docker/nginx_default.conf Normal file
View File

@ -0,0 +1,26 @@
server {
listen 80;
server_name daux.io;
index index.php;
charset utf-8;
root /var/www;
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php$1;
}
}
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass phpserver:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}