Docker implementation
This commit is contained in:
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM php:8-fpm
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./php-errors.ini /usr/local/etc/php/conf.d/docker-php-errors.ini
|
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
@ -0,0 +1,23 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
proxy:
|
||||
container_name: lv_proxy
|
||||
profiles:
|
||||
- app
|
||||
image: nginx
|
||||
ports:
|
||||
- "${WEB_PORT:-8030}:80"
|
||||
volumes:
|
||||
- "./nginx.conf:/etc/nginx/conf.d/default.conf"
|
||||
- "./src:/app"
|
||||
- "./logs:/logs"
|
||||
|
||||
php:
|
||||
container_name: lv_app
|
||||
profiles:
|
||||
- app
|
||||
build: .
|
||||
volumes:
|
||||
- "./src:/app"
|
||||
- "./logs:/logs"
|
22
nginx.conf
Normal file
22
nginx.conf
Normal file
@ -0,0 +1,22 @@
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
error_log /logs/error.log;
|
||||
access_log /logs/access.log;
|
||||
root /app/public;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_read_timeout 3600;
|
||||
fastcgi_pass php:9000;
|
||||
}
|
||||
}
|
3
php-errors.ini
Normal file
3
php-errors.ini
Normal file
@ -0,0 +1,3 @@
|
||||
display_errors=no
|
||||
log_errors=yes
|
||||
error_log=/logs/php_errors.log
|
Reference in New Issue
Block a user