Carga inicial
This commit is contained in:
10
docker/entrypoint-production.sh
Normal file
10
docker/entrypoint-production.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# This script checks if the container is started for the first time.
|
||||
|
||||
composer install --no-interaction --no-plugins --no-scripts
|
||||
|
||||
chown -R www-data:www-data storage/ bootstrap/
|
||||
chmod -R 755 storage/ bootstrap/
|
||||
|
||||
# run the command sent as arguments to this script
|
||||
exec "$@"
|
||||
63
docker/nginx-default.conf
Normal file
63
docker/nginx-default.conf
Normal file
@@ -0,0 +1,63 @@
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
error_log /var/log/nginx/error.log;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 5000;
|
||||
use epoll;
|
||||
multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
types_hash_max_size 2048;
|
||||
client_max_body_size 10M;
|
||||
# server_tokens off;
|
||||
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
##
|
||||
# SSL Settings
|
||||
##
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
##
|
||||
# Logging Settings
|
||||
##
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
##
|
||||
# Gzip Settings
|
||||
##
|
||||
|
||||
gzip on;
|
||||
|
||||
# gzip_vary on;
|
||||
# gzip_proxied any;
|
||||
# gzip_comp_level 6;
|
||||
# gzip_buffers 16 8k;
|
||||
# gzip_http_version 1.1;
|
||||
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
33
docker/nginx.conf
Normal file
33
docker/nginx.conf
Normal file
@@ -0,0 +1,33 @@
|
||||
server {
|
||||
listen 80;
|
||||
root /var/www/laravel/public;
|
||||
|
||||
index index.php index.html;
|
||||
charset utf-8;
|
||||
client_max_body_size 10M;
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_buffering off;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
gzip_static on;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
11
docker/php-fpm.conf
Normal file
11
docker/php-fpm.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
[www]
|
||||
user = www-data
|
||||
group = www-data
|
||||
listen = 127.0.0.1:9000
|
||||
|
||||
pm = dynamic
|
||||
pm.max_children = 5000
|
||||
pm.start_servers = 3
|
||||
pm.min_spare_servers = 3
|
||||
pm.max_spare_servers = 5
|
||||
6
docker/php.ini
Normal file
6
docker/php.ini
Normal file
@@ -0,0 +1,6 @@
|
||||
log_errors=1
|
||||
display_errors=1
|
||||
post_max_size=40M
|
||||
upload_max_filesize=40M
|
||||
display_startup_errors=1
|
||||
error_log=/var/log/php/errors.log
|
||||
25
docker/storage.conf
Normal file
25
docker/storage.conf
Normal file
@@ -0,0 +1,25 @@
|
||||
server {
|
||||
listen 8080;
|
||||
sendfile on;
|
||||
default_type application/octet-stream;
|
||||
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
autoindex_format html;
|
||||
autoindex_localtime on;
|
||||
|
||||
gzip on;
|
||||
gzip_http_version 1.1;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
gzip_min_length 256;
|
||||
gzip_vary on;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
gzip_comp_level 9;
|
||||
|
||||
root /var/www/laravel/storage/app/public;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
}
|
||||
40
docker/supervisor.conf
Normal file
40
docker/supervisor.conf
Normal file
@@ -0,0 +1,40 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
loglevel = info
|
||||
logfile=/var/log/supervisord.log
|
||||
pidfile=/var/run/supervisord.pid
|
||||
|
||||
[group:laravel-worker]
|
||||
priority=999
|
||||
programs=nginx,php8-fpm,laravel-queue
|
||||
|
||||
[program:nginx]
|
||||
priority=10
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile_maxbytes=0
|
||||
stdout_logfile_maxbytes=0
|
||||
stdout_events_enabled=true
|
||||
stderr_events_enabled=true
|
||||
command=/usr/sbin/nginx -g 'daemon off;'
|
||||
stderr_logfile=/var/log/nginx/error.log
|
||||
stdout_logfile=/var/log/nginx/access.log
|
||||
|
||||
[program:php8-fpm]
|
||||
priority=5
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile_maxbytes=0
|
||||
stdout_logfile_maxbytes=0
|
||||
command=/usr/local/sbin/php-fpm -R
|
||||
stderr_logfile=/var/log/nginx/php-error.log
|
||||
stdout_logfile=/var/log/nginx/php-access.log
|
||||
|
||||
[program:laravel-queue]
|
||||
numprocs=10
|
||||
autostart=true
|
||||
autorestart=true
|
||||
redirect_stderr=true
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
stdout_logfile=/var/log/nginx/worker.log
|
||||
command=php /var/www/laravel/artisan queue:work --queue=queue,high,medium,low --timeout=3600
|
||||
Reference in New Issue
Block a user