added docker files and update roster form

This commit is contained in:
franknstayn
2023-09-04 23:22:33 +08:00
parent 006169a8b7
commit adf50d9d69
8 changed files with 96 additions and 60 deletions

39
nginx/conf.d/app.conf Normal file
View File

@@ -0,0 +1,39 @@
server {
listen 80;
index index.php index.html;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www;
index index.php index.html;
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE, HEAD';
add_header 'Access-Control-Max-Age' '1728000';
add_header 'Access-Control-Allow-Headers' '*';
#add_header 'Content-Type: text/plain; charset=UTF-8';
#add_header 'Content-Length: 0';
return 204;
}
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_index index.php;
fastcgi_pass app:9000;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* \.(css|less|js|jpg|png|gif)$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
expires 0;
}
}