Skip to content

Commit

Permalink
Add a docker-compose configuration to try to reproduce dauxio#386
Browse files Browse the repository at this point in the history
  • Loading branch information
onigoetz committed Aug 5, 2016
1 parent 6837b28 commit 594ee68
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
18 changes: 18 additions & 0 deletions docker/docker-compose.5.yml
Original file line number Diff line number Diff line change
@@ -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/
18 changes: 18 additions & 0 deletions docker/docker-compose.7.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 26 additions & 0 deletions docker/nginx_default.conf
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit 594ee68

Please sign in to comment.