docker stuff
This commit is contained in:
1
docker/.htaccess
Normal file
1
docker/.htaccess
Normal file
@@ -0,0 +1 @@
|
||||
DENY FROM ALL
|
||||
46
docker/nginx/site.conf
Normal file
46
docker/nginx/site.conf
Normal file
@@ -0,0 +1,46 @@
|
||||
server {
|
||||
index index.php index.html;
|
||||
error_log /var/log/nginx/error.log;
|
||||
access_log /var/log/nginx/access.log;
|
||||
root /application;
|
||||
|
||||
# rewrite api
|
||||
rewrite ^/api(/.*)$ /index.php?api=$1;
|
||||
|
||||
# deny access to .gitignore / .htaccess
|
||||
location ~ /\. {
|
||||
rewrite ^(.*)$ /index.php?site=$1;
|
||||
}
|
||||
|
||||
# deny access to docker-compose.yml
|
||||
location /docker-compose.yml {
|
||||
rewrite ^(.*)$ /index.php?site=$1;
|
||||
}
|
||||
|
||||
# deny access to specific directories
|
||||
location ~ ^/(files/uploaded|adminPanel|fileControlPanel|docker|core)/.*$ {
|
||||
rewrite ^(.*)$ /index.php?site=$1;
|
||||
}
|
||||
|
||||
# try to find the specified file
|
||||
location / {
|
||||
try_files $uri $uri @redirectToIndex;
|
||||
}
|
||||
|
||||
# redirect to index.php
|
||||
location @redirectToIndex {
|
||||
rewrite ^(.*)$ /index.php?site=$1;
|
||||
}
|
||||
|
||||
# serve .php files
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
}
|
||||
4
docker/php/Dockerfile
Normal file
4
docker/php/Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
||||
FROM php:7-fpm
|
||||
WORKDIR "/application"
|
||||
|
||||
RUN docker-php-ext-install mysqli
|
||||
1950
docker/php/php.ini
Normal file
1950
docker/php/php.ini
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user