Added docker configuration.
This commit is contained in:
parent
410d42e2bb
commit
6e9794fb8c
2 changed files with 55 additions and 0 deletions
26
Docker/docker-compose.yml
Normal file
26
Docker/docker-compose.yml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
web:
|
||||
image: nginx:latest
|
||||
container_name: lewp_nginx
|
||||
depends_on:
|
||||
- php
|
||||
volumes:
|
||||
- ./nginx:/etc/nginx/conf.d/
|
||||
- ./../:/var/www/html
|
||||
ports:
|
||||
- 8080:80
|
||||
|
||||
php:
|
||||
image: php:8-fpm
|
||||
container_name: lewp_php
|
||||
volumes:
|
||||
- ./../:/var/www/html
|
||||
|
||||
composer:
|
||||
image: composer:2.0.8
|
||||
container_name: lewp_composer
|
||||
volumes:
|
||||
- ./../:/app
|
||||
command: composer install --ignore-platform-reqs
|
||||
29
Docker/nginx/localhost.conf
Normal file
29
Docker/nginx/localhost.conf
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
server {
|
||||
server_name localhost;
|
||||
|
||||
listen 80;
|
||||
root /var/www/html/www/localhost/bin;
|
||||
|
||||
access_log /var/log/nginx/localhost.access.log;
|
||||
error_log /var/log/nginx/localhost.error.log;
|
||||
|
||||
rewrite ^.*$ /index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_param REQUEST_URI $request_uri;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
|
||||
fastcgi_pass lewp_php:9000;
|
||||
}
|
||||
|
||||
|
||||
gzip on;
|
||||
gzip_comp_level 2;
|
||||
gzip_http_version 1.0;
|
||||
gzip_proxied any;
|
||||
gzip_min_length 1100;
|
||||
gzip_buffers 16 8k;
|
||||
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue