updated
This commit is contained in:
@@ -38,7 +38,8 @@ RUN composer install
|
|||||||
RUN php artisan key:generate
|
RUN php artisan key:generate
|
||||||
|
|
||||||
# Expose port 9000 for PHP-FPM
|
# Expose port 9000 for PHP-FPM
|
||||||
|
EXPOSE 80
|
||||||
EXPOSE 9001
|
EXPOSE 9001
|
||||||
|
|
||||||
# Start PHP-FPM
|
# Start PHP-FPM
|
||||||
CMD ["php-fpm"]
|
CMD ["nginx", "-g", "daemon off;", "&", "php-fpm"]
|
||||||
|
|||||||
26
default.conf
26
default.conf
@@ -5,27 +5,23 @@ server {
|
|||||||
root /var/www/html;
|
root /var/www/html;
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|
||||||
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php?$query_string;
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.php {
|
location ~ \.php {
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
|
fastcgi_pass php-fpm:9001; # Use the service name and exposed port
|
||||||
|
include fastcgi_params;
|
||||||
include fastcgi_params;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
||||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(css|less|js|jpg|png|gif)$ {
|
location ~* \.(css|less|js|jpg|png|gif)$ {
|
||||||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||||
add_header Pragma "no-cache";
|
add_header Pragma "no-cache";
|
||||||
expires 0;
|
expires 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user