feat: support running using Docker Compose
This commit adds a Docker Compose file which will run the application using docker. The application is fronted by Traefik, and runs using PHP-fpm. nginx is used to accept queries from Traefik and relay them to the PHP-fpm containers (Traefik doesn't support FastCGI directly). Sessions are shared between the various PHP containers using memcached. Part of this work is based on [this repo](https://github.com/wandersonwhcr/docker-nginx-php-fpm)
This commit is contained in:
parent
bdf56ece83
commit
5110ded7e5
8 changed files with 201 additions and 0 deletions
docker/nginx-templates
21
docker/nginx-templates/default.conf.template
Normal file
21
docker/nginx-templates/default.conf.template
Normal file
|
@ -0,0 +1,21 @@
|
|||
server {
|
||||
listen 80;
|
||||
|
||||
index index.php;
|
||||
root /var/www/tasks/site;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php$request_uri;
|
||||
|
||||
}
|
||||
|
||||
location /index.php/ {
|
||||
fastcgi_pass application:9000;
|
||||
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_NAME "/index.php";
|
||||
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue