mirror of
https://github.com/bitinflow/laravel-docker-k8s.git
synced 2026-03-13 13:35:52 +00:00
initial commit
This commit is contained in:
49
docker/nginx/default.conf
Executable file
49
docker/nginx/default.conf
Executable file
@@ -0,0 +1,49 @@
|
||||
server {
|
||||
# Set the port to listen on and the server name
|
||||
listen 80 default_server;
|
||||
|
||||
# Set the document root of the project
|
||||
root /var/www/html/public;
|
||||
|
||||
# Set the directory index files
|
||||
index index.php index.html index.htm;
|
||||
|
||||
# Specify the default character set
|
||||
charset utf-8;
|
||||
|
||||
# Setup the default location configuration
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
# Specify the details of favicon.ico
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
|
||||
# Specify the details of robots.txt
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
# Specify the logging configuration
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
sendfile off;
|
||||
|
||||
client_max_body_size 100m;
|
||||
|
||||
# Specify what happens when PHP files are requested
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php?$args;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
49
docker/nginx/nginx.conf
Executable file
49
docker/nginx/nginx.conf
Executable file
@@ -0,0 +1,49 @@
|
||||
server {
|
||||
# Set the port to listen on and the server name
|
||||
listen 80 default_server;
|
||||
|
||||
# Set the document root of the project
|
||||
root /var/www/html/public;
|
||||
|
||||
# Set the directory index files
|
||||
index index.php index.html index.htm;
|
||||
|
||||
# Specify the default character set
|
||||
charset utf-8;
|
||||
|
||||
# Setup the default location configuration
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
# Specify the details of favicon.ico
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
|
||||
# Specify the details of robots.txt
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
# Specify the logging configuration
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
sendfile off;
|
||||
|
||||
client_max_body_size 100m;
|
||||
|
||||
# Specify what happens when PHP files are requested
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass localhost:9000;
|
||||
fastcgi_index index.php?$args;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
17
docker/php/Dockerfile
Executable file
17
docker/php/Dockerfile
Executable file
@@ -0,0 +1,17 @@
|
||||
FROM php:7.1.3-fpm
|
||||
|
||||
RUN apt-get update && apt-get install zlib1g-dev -y \
|
||||
libmcrypt-dev \
|
||||
libpq-dev \
|
||||
libjpeg-dev \
|
||||
libpng-dev \
|
||||
supervisor \
|
||||
git zip \
|
||||
&& docker-php-ext-install -j$(nproc) mcrypt \
|
||||
&& docker-php-ext-install -j$(nproc) pdo \
|
||||
&& docker-php-ext-install -j$(nproc) pdo_pgsql \
|
||||
&& docker-php-ext-install -j$(nproc) gd
|
||||
|
||||
|
||||
RUN curl -sS https://getcomposer.org/installer | \
|
||||
php -- --install-dir=/usr/bin/ --filename=composer
|
||||
3
docker/php/custom.ini
Executable file
3
docker/php/custom.ini
Executable file
@@ -0,0 +1,3 @@
|
||||
log_errors = On
|
||||
error_log = /dev/stderr
|
||||
memory_limit = 512M
|
||||
Reference in New Issue
Block a user