Update Docker configuration
This commit is contained in:
parent
dba2b1004c
commit
9f398ee012
12 changed files with 224 additions and 50 deletions
tools/docker/images
nginx/root/etc/nginx/conf.d
php/root/usr/local/bin
web/root/etc/nginx/conf.d
20
tools/docker/images/nginx/root/etc/nginx/conf.d/default.conf
Normal file
20
tools/docker/images/nginx/root/etc/nginx/conf.d/default.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
server {
|
||||
server_name _;
|
||||
|
||||
root /app/web;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
||||
try_files $fastcgi_script_name =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param QUERY_STRING $query_string;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_pass php:9000;
|
||||
}
|
||||
}
|
5
tools/docker/images/php/root/usr/local/bin/docker-entrypoint-php
Executable file
5
tools/docker/images/php/root/usr/local/bin/docker-entrypoint-php
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
[[ -f composer.json && ! -d vendor ]] && composer install
|
||||
|
||||
eval "$@"
|
20
tools/docker/images/web/root/etc/nginx/conf.d/default.conf
Normal file
20
tools/docker/images/web/root/etc/nginx/conf.d/default.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
server {
|
||||
server_name _;
|
||||
|
||||
root /app/docroot;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
|
||||
try_files $fastcgi_script_name =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param QUERY_STRING $query_string;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_pass php:9000;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue