Docker set up for cake-php
server {
    listen   80;
    server_name localhost;
    # root directive should be global
    root   /usr/share/nginx/html/webroot/;
    index  index.php;
    sendfile off;
    expires off;
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
    location ~ \.php$ {
        try_files $uri =404;
        include /etc/nginx/fastcgi_params;
        fastcgi_pass    fpm:9000;
        fastcgi_index   index.php;
        fastcgi_param SCRIPT_FILENAME /var/www/html/webroot/$fastcgi_script_name;
    }
}FROM nginx
MAINTAINER occitech <contact@occitech.fr>
COPY ./cakephp.conf /etc/nginx/conf.d/default.conf
WORKDIR /usr/share/nginx/htmlnginx:
  build: .
  ports:
    - 80
  links:
    - fpm
  volumes:
    - ".:/usr/share/nginx/html"
fpm:
  image: occitech/cakephp:5.6-fpm
  links:
    - mariadb
  volumes:
    - ".:/var/www/html"
mariadb:
  image: mariadb
  environment:
    MYSQL_ROOT_PASSWORD: "root"
    MYSQL_DATABASE: "cakephp"
phpmyadmin:
    image: nazarpc/phpmyadmin
    links:
     - mariadb:mysql
    ports:
     - 1234:80