Skip to content

Commit

Permalink
use nginx and fpm for docker containers
Browse files Browse the repository at this point in the history
  • Loading branch information
arroyo committed Sep 10, 2016
1 parent 0204935 commit f0d09a6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '2'

services:
webserver:
container_name: erdiko_nginx
image: nginx:latest
env_file: environment.env
volumes:
- .:/code
- ./docker/nginx/site.conf:/etc/nginx/conf.d/site.conf
- ./docker/nginx/fastcgi.conf:/etc/nginx/fastcgi.conf
ports:
- "8088:80"
php:
container_name: erdiko_php7
env_file: environment.env
image: erdiko_php7fpm
build:
context: ./docker/php7
volumes:
- .:/code
- ./docker/php7/conf.d:/usr/local/etc/php/conf.d
18 changes: 0 additions & 18 deletions docker/nginx/site.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,4 @@ server {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location /admin {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-container;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location /examples/examples {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-container;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}

0 comments on commit f0d09a6

Please sign in to comment.