Refactor Docker setup for Laravel 5.0 compatibility and optimize deployment process

- Updated Dockerfile configurations for various environments (alpine, basic, cloudrun, minimal, simple, test) to ensure compatibility with Laravel 5.0 and PHP 5.6.
- Added PHP compatibility documentation outlining mcrypt requirements and upgrade paths.
- Created cloudbuild.yaml for Google Cloud Build integration to streamline deployment to Cloud Run.
- Introduced docker-compose.local.yml for local development with MySQL and Redis services.
- Enhanced rebuild.sh script for easier local development and migration handling.
- Updated Laravel Blade views to correct asset paths.
- Added start-local.sh script for quick local setup and service management.
This commit is contained in:
Frank John Begornia
2025-08-11 23:14:31 +08:00
parent 70496dc874
commit 02c7f4e2aa
17 changed files with 1285 additions and 38 deletions

View File

@@ -3,37 +3,29 @@ server {
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;
root /var/www/public;
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;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_index index.php;
fastcgi_pass app:9000;
include fastcgi_params;
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ /\.ht {
deny all;
}
location ~* \.(css|less|js|jpg|png|gif)$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
expires 0;
expires 0;
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
}
}