### PROJECT SETTINGS
PROJECT_NAME=testdocker
PROJECT_BASE_URL=testdocker.localhost
PROJECT_PORT=8000
DB_NAME=drupal
DB_USER=drupal
DB_PASSWORD=drupal
DB_ROOT_PASSWORD=password
DB_HOST=mariadb
DB_PORT=3306
DB_DRIVER=mysql
### --- MARIADB ----
MARIADB_TAG=10.8-3.21.6
### --- VANILLA DRUPAL ----
DRUPAL_TAG=9-4.46.1
#DRUPAL_TAG=7-4.46.1
### --- PHP ----
# Linux (uid 1000 gid 1000)
PHP_TAG=8.1-dev-4.38.1
### --- NGINX ----
NGINX_TAG=1.23-5.25.7
NGINX_VHOST_PRESET=drupal9
### --- SOLR ---
SOLR_TAG=8-4.18.1
SOLR_CONFIG_SET="search_api_solr_4.1.6"
### --- ELASTICSEARCH ---
ELASTICSEARCH_TAG=7-5.18.5
### --- KIBANA ---
KIBANA_TAG=7-5.18.5
### --- REDIS ---
REDIS_TAG=7-3.14.6
### --- NODE ---
NODE_TAG=18-dev-1.14.0
### --- VARNISH ---
VARNISH_TAG=6.0-4.11.3
### --- POSTGRESQL ----
POSTGRES_TAG=14-1.28.5
### OTHERS
ADMINER_TAG=4-3.24.1
APACHE_TAG=2.4-4.10.3
ATHENAPDF_TAG=2.16.0
DRUPAL_NODE_TAG=1.0-2.0.0
MEMCACHED_TAG=1-2.13.4
OPENSMTPD_TAG=6-1.14.3
RSYSLOG_TAG=latest
SELENIUM_CHROME_TAG=3.141
WEBGRIND_TAG=1-1.29.1
XHPROF_TAG=3.7.1
ZOOKEEPER_TAG=3.8
version: "3.7"
services:
mariadb:
image: wodby/mariadb:$MARIADB_TAG
container_name: "${PROJECT_NAME}_mariadb"
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
php:
image: wodby/drupal-php:$PHP_TAG
container_name: "${PROJECT_NAME}_php"
environment:
SSMTP_MAILHUB: mailhog:1025
PHP_SENDMAIL_PATH: '"/usr/bin/dos2unix -u | /usr/sbin/ssmtp -t -f"'
volumes:
- ./:/var/www/html:cached
crond:
image: wodby/drupal-php:$PHP_TAG
container_name: "${PROJECT_NAME}_crond"
environment:
CRONTAB: "0 * * * * drush -r /var/www/html/web cron"
command: sudo -E crond -f -d 0
volumes:
- ./:/var/www/html:cached
nginx:
image: wodby/nginx:$NGINX_TAG
container_name: "${PROJECT_NAME}_nginx"
depends_on:
- php
environment:
NGINX_STATIC_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: /var/www/html/web
NGINX_VHOST_PRESET: $NGINX_VHOST_PRESET
volumes:
- ./:/var/www/html:cached
labels:
- "traefik.http.routers.${PROJECT_NAME}_nginx.rule=Host(`${PROJECT_BASE_URL}`)"
mailhog:
image: mailhog/mailhog
container_name: "${PROJECT_NAME}_mailhog"
labels:
- "traefik.http.services.${PROJECT_NAME}_mailhog.loadbalancer.server.port=8025"
- "traefik.http.routers.${PROJECT_NAME}_mailhog.rule=Host(`mailhog.${PROJECT_BASE_URL}`)"
pma:
image: phpmyadmin/phpmyadmin
container_name: "${PROJECT_NAME}_pma"
environment:
PMA_HOST: $DB_HOST
PMA_USER: $DB_USER
PMA_PASSWORD: $DB_PASSWORD
UPLOAD_LIMIT: 1G
labels:
- "traefik.http.routers.${PROJECT_NAME}_pma.rule=Host(`pma.${PROJECT_BASE_URL}`)"
traefik:
image: traefik:v2.0
container_name: "${PROJECT_NAME}_traefik"
command: --api.insecure=true --providers.docker
ports:
- "${PROJECT_PORT}:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
Options -Indexes
Options +FollowSymLinks
ErrorDocument 404 /index.php
DirectoryIndex index.php index.html index.htm
<IfModule mod_php5.c>
php_flag magic_quotes_gpc off
php_flag magic_quotes_sybase off
php_flag register_globals off
php_flag session.auto_start off
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_flag mbstring.encoding_translation off
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A1209600
<FilesMatch \.php$>
ExpiresActive Off
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
#---редирект со старых адресов
RewriteCond %{THE_REQUEST} ^\S+\s/index\.php\?(?=.*?mode=archive)(?=.*?year=(\d+))(?=.*?number=(\d+))
RewriteRule ^ /ru/archive/%1/%2/? [R=301,L]
#---конец редиректа старых адресов
RewriteRule ^ - [E=protossl]
RewriteCond %{HTTPS} on
RewriteRule ^ - [E=protossl:s]
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule "/\.|^\.(?!well-known/)" - [F]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
<IfModule mod_headers.c>
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]
<FilesMatch "(\.js\.gz|\.css\.gz)$">
Header set Content-Encoding gzip
Header append Vary Accept-Encoding
</FilesMatch>
</IfModule>
</IfModule>
<IfModule mod_headers.c>
Header always set X-Content-Type-Options nosniff
</IfModule>
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<FilesMatch "robots.txt$">
RewriteEngine off
</FilesMatch>
К сожалению, проблема на этом не решена. Теперь вместо невозможности соединения выводится 404 page not found. Что было бы ожидаемым поведением в отсутствии индексного файла. Но index.php залит. Однако система его не видит почему-то :(