использую для Moodle docker с конфигурацией nginx + PHP 7.3 + mysql 5.7
1) Будет ли мудл работать без Apache? На nginx + php -fpm?
2) при установке выходят ошибки на скрине. Как исправить? Спасибо заранее.
Содержимое docker-compose.yml
version: '3'Конфиг nginx
networks:
backend:
services:
nginx:
image: nginx:stable-alpine
container_name: nginx
ports:
- "${NGINX_PORT}:80"
volumes:
- ./projects:/var/www
- ./mdldata/:/var/mdldata/
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/logs:/var/log/nginx/
depends_on:
- php-7.3
- mysql-5.7
environment:
TZ: ${WORKSPACE_TIMEZONE}
networks:
- backend
mysql-5.7:
image: mysql:5.7
container_name: mysql-5.7
restart: unless-stopped
volumes:
- ./mysql-5.7/data:/var/lib/mysql
- ./mysql-5.7/conf.d:/etc/mysql/conf.d
- ./mysql-5.7/logs:/var/log/mysql/
- ./mysql-5.7/dump:/dump
ports:
- "${MYSQL_5_7_PORT}:3306"
security_opt:
- seccomp:unconfined
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
TZ: ${WORKSPACE_TIMEZONE}
networks:
- backend
php-7.3:
build:
context: ./php-workspace
dockerfile: Dockerfile
args:
DOCKER_PHP_VERSION: '7.3'
DOCKER_PHP_ENABLE_XDEBUG: ${DOCKER_PHP_ENABLE_XDEBUG}
TZ: ${WORKSPACE_TIMEZONE}
working_dir: /var/www
container_name: php-7.3
volumes:
- ./.ssh:/home/www-data/.ssh
- ./projects:/var/www
- ./mdldata/:/var/mdldata/
- ./php-ini/7.3/php.ini:/usr/local/etc/php/php.ini
- ./php-workers/7.3/supervisor.d:/etc/supervisor.d
ports:
- "${PHP_7_3_PORT}:9000"
networks:
- backend
extra_hosts:
- 'mdl.local:192.168.65.2'
server {
listen 80;
index index.php index.html;
server_name mdl.local;
error_log /var/log/nginx/mdl.local.error.log debug;
access_log /var/log/nginx/mdl.local.access.log combined if=$loggable;
server_name_in_redirect off;
charset utf-8;
gzip on;
gzip_disable "msie6";
client_max_body_size 10000M;
root /var/www/mdl.local/;
proxy_read_timeout 1800;
proxy_connect_timeout 1800;
proxy_send_timeout 1800;
send_timeout 1800;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ [^/]\.php(/|$) {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass php-7.3:9000;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_send_timeout 600s;
fastcgi_read_timeout 600s;
fastcgi_cache_lock_timeout 15s;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location /dataroot/ {
internal;
alias /var/mdldata; # ensure the path ends with /
}
location ~ /\.ht {
deny all;
}
}