maybe fix docker?
This commit is contained in:
58
docker/nginx.conf
Normal file
58
docker/nginx.conf
Normal file
@ -0,0 +1,58 @@
|
||||
events {
|
||||
worker_connections 4096;
|
||||
}
|
||||
|
||||
http {
|
||||
access_log /dev/stdout;
|
||||
|
||||
server {
|
||||
server_name _;
|
||||
listen 80;
|
||||
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 8;
|
||||
gzip_buffers 16 64k;
|
||||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
root /var/www/html;
|
||||
index index.html index.htm;
|
||||
|
||||
client_max_body_size 500M;
|
||||
|
||||
# TCP optimizations
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
|
||||
# file shit
|
||||
sendfile on;
|
||||
|
||||
# Keep connections alive for 15 seconds
|
||||
keepalive_timeout 15;
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/var/run/php/php-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location / {
|
||||
expires 7d;
|
||||
|
||||
open_file_cache max=1000 inactive=60s;
|
||||
open_file_cache_valid 60s;
|
||||
open_file_cache_min_uses 1;
|
||||
open_file_cache_errors on;
|
||||
|
||||
# Serve the file directly from disk
|
||||
try_files $uri $uri/;
|
||||
}
|
||||
}
|
||||
}
|
13
docker/start.sh
Normal file
13
docker/start.sh
Normal file
@ -0,0 +1,13 @@
|
||||
UPLOAD_SCRIPT="upload.php"
|
||||
|
||||
echo "Checking if $UPLOAD_SCRIPT exists in /var/www/html"
|
||||
if [ -f "$UPLOAD_SCRIPT" ]; then
|
||||
echo "$FILE exists, not copying"
|
||||
else
|
||||
cp /var/www/html/$UPLOAD_SCRIPT $UPLOAD_SCRIPT
|
||||
echo "$UPLOAD_SCRIPT copied to /var/www/html/$UPLOAD_SCRIPT"
|
||||
fi
|
||||
|
||||
# Start Nginx
|
||||
echo "Starting Nginx"
|
||||
nginx -g "daemon off;"
|
Reference in New Issue
Block a user