Skip to content

Instantly share code, notes, and snippets.

@gullitmiranda
Created April 23, 2015 16:22
Show Gist options
  • Save gullitmiranda/ae23c67d1a04306a1908 to your computer and use it in GitHub Desktop.
Save gullitmiranda/ae23c67d1a04306a1908 to your computer and use it in GitHub Desktop.
Azkfile.js to configure `public` folder in nginx of `php-fpm`
systems({
"my-app": {
image: {"docker": "azukiapp/php-fpm"},
provision: [
// "composer install",
],
workdir: "/azk/#{manifest.dir}",
mounts: {
'/azk/#{manifest.dir}': path("."),
'/etc/nginx/sites-enabled/nginx_public.conf': path("./nginx_public.conf")
},
scalable: {"default": 2},
},
});
server {
client_max_body_size 20M;
listen 80 default_server;
root /app/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.html /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi.conf;
fastcgi_pass phpfpm_backend;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment