Add configuration folder for all container

This commit is contained in:
Dwi Fahni Denni (zeroc0d3)
2018-04-28 08:20:22 +07:00
parent 74bbfb8443
commit 3515716dc4
36 changed files with 1296 additions and 0 deletions

0
config/.gitkeep Normal file
View File

0
config/adminer/.gitignore vendored Normal file
View File

View File

@@ -0,0 +1,77 @@
# Aerospike database configuration file.
# This stanza must come first.
service {
user root
group root
paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
pidfile /var/run/aerospike/asd.pid
service-threads 4
transaction-queues 4
transaction-threads-per-queue 4
proto-fd-max 15000
}
logging {
# Log file must be an absolute path.
file /var/log/aerospike/aerospike.log {
context any info
}
# Send log messages to stdout
console {
context any critical
}
}
network {
service {
address any
port 3000
# Uncomment the following to set the `access-address` parameter to the
# IP address of the Docker host. This will the allow the server to correctly
# publish the address which applications and other nodes in the cluster to
# use when addressing this node.
# access-address <IPADDR>
}
heartbeat {
# mesh is used for environments that do not support multicast
mode mesh
port 3002
# use asinfo -v 'tip:host=<ADDR>;port=3002' to inform cluster of
# other mesh nodes
mesh-port 3002
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
}
namespace test {
replication-factor 2
memory-size 1G
default-ttl 5d # 5 days, use 0 to never expire/evict.
# storage-engine memory
# To use file storage backing, comment out the line above and use the
# following lines instead.
storage-engine device {
file /opt/aerospike/data/test.dat
filesize 4G
data-in-memory true # Store data in memory in addition to file.
}
}

176
config/deploy.rb Normal file
View File

@@ -0,0 +1,176 @@
# config valid for current version and patch releases of Capistrano
lock "~> 3.10.1"
set :application, "laradock"
set :repo_url, "git@github.com:laradock/laradock.git"
# Default branch is :master
set :branch, 'master'
# Default deploy_to directory is /var/www/my_app_name
set :root_path, "/var/www"
set :deploy_to, "#{ fetch(:root_path) }/production"
set :current_folder, "#{ fetch(:deploy_to) }/current"
set :shared_folder, "#{ fetch(:deploy_to) }/shared"
set :releases_folder, "#{ fetch(:deploy_to) }/releases"
set :tmp_dir, "#{ fetch(:deploy_to) }/tmp"
set :pty, true
# Default value for :linked_files is []
append :linked_files, ".env", "composer.json", "package.json", "composer.phar"
# Default value for :linked_dirs []
append :linked_dirs, "storage", "vendor"
# Default value for keep_releases is 5
set :keep_releases, 5
set :rbenv_type, :user
set :rbenv_ruby, '2.4.2'
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
namespace :deploy do
desc 'Restart Deploy'
task :restart do
on roles(:web) do
if test("[ -d #{ current_path }/storage ]")
execute "chmod 777 -R #{ current_path }/storage"
else
info "Can't find: #{ current_path }/storage folder!"
end
end
end
end
namespace :chown do
desc 'Restore Ownership Folder'
task :restore do
on roles(:all) do
if test("[ -d #{ release_path }/storage]")
execute! :sudo, "chown www-data:www-data -R #{ release_path }/storage"
else
info "Can't find: #{ release_path }/storage folder!"
end
end
end
task :change do
on roles(:all) do
if test("[ -d #{ current_path }/storage]")
execute! :sudo, "chown www-data:www-data -R #{ current_path }/storage"
else
info "Can't find: #{ current_path }/storage folder!"
end
end
end
end
namespace :nginx do
desc 'Reload NGINX'
task :manual_reload do
on roles(:all) do
sudo :service, :nginx, :reload
end
end
desc 'Restart NGINX'
task :manual_start do
on roles(:all), in: :sequence do
execute! :sudo, :service, :nginx, :restart
end
end
task :manual_restart do
on roles(:all) do
invoke 'nginx:manual_reload'
invoke 'nginx:manual_start'
end
end
end
namespace :phpfpm do
desc 'Reload PHP-FPM'
task :manual_reload do
on roles(:all) do
sudo :service, :'php7.2-fpm', :reload
end
end
desc 'Restart PHP-FPM'
task :manual_start do
on roles(:all), in: :sequence do
execute! :sudo, :service, :'php7.2-fpm', :restart
end
end
task :manual_restart do
on roles(:all) do
invoke 'phpfpm:manual_reload'
invoke 'phpfpm:manual_start'
end
end
end
namespace :composer do
desc 'Install Composer'
task :install do
on roles(:all) do
execute "cd #{ current_path }; composer install"
end
end
desc 'Update Composer'
task :update do
on roles(:all) do
execute "cd #{ current_path }; composer self-update"
end
end
desc 'Dump Autoload Composer'
task :dumpautoload do
on roles(:all) do
execute "cd #{ current_path }; composer dump-autoload -o"
end
end
task :initialize do
on roles(:all) do
invoke 'composer:install'
invoke 'composer:dumpautoload'
end
end
end
namespace :artisan do
desc 'Clear View'
task :clear_view do
on roles(:all) do
execute "cd #{ current_path }; php artisan view:clear"
end
end
desc 'Clear Cache'
task :clear_cache do
on roles(:all) do
execute "cd #{ current_path }; php artisan cache:clear"
end
end
task :clear_all do
on roles(:all) do
invoke 'artisan:clear_view'
invoke 'artisan:clear_cache'
end
end
end
after 'deploy:publishing', 'deploy:restart'
after 'deploy:restart', 'composer:initialize'
after 'deploy:restart', 'artisan:clear_all'
after 'deploy:restart', 'nginx:manual_restart'
after 'chown:restore', 'nginx:manual_restart'
after 'chown:change', 'nginx:manual_restart'
after 'nginx:manual_restart', 'phpfpm:manual_restart'

View File

@@ -0,0 +1,22 @@
server 'production', user: 'root', roles: %w{app web}
set :branch, 'master'
# Default deploy_to directory is /var/www/my_app_name
set :root_path, "/var/www"
set :deploy_to, "#{ fetch(:root_path) }/production"
set :current_folder, "#{ fetch(:deploy_to) }/current"
set :shared_folder, "#{ fetch(:deploy_to) }/shared"
set :releases_folder, "#{ fetch(:deploy_to) }/releases"
set :tmp_dir, "#{ fetch(:deploy_to) }/tmp"
set :pty, true
set :ssh_options, {
forward_agent: true
}
set :default_environment, {
'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
}

22
config/deploy/staging.rb Normal file
View File

@@ -0,0 +1,22 @@
server 'staging', user: 'root', roles: %w{app web}
set :branch, 'master'
# Default deploy_to directory is /var/www/my_app_name
set :root_path, "/var/www"
set :deploy_to, "#{ fetch(:root_path) }/staging"
set :current_folder, "#{ fetch(:deploy_to) }/current"
set :shared_folder, "#{ fetch(:deploy_to) }/shared"
set :releases_folder, "#{ fetch(:deploy_to) }/releases"
set :tmp_dir, "#{ fetch(:deploy_to) }/tmp"
set :pty, true
set :ssh_options, {
forward_agent: true
}
set :default_environment, {
'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
}

View File

@@ -0,0 +1 @@
network.host: 0.0.0.0

View File

@@ -0,0 +1,15 @@
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console
logger:
# log action execution errors for easier debugging
action: DEBUG
# reduce the logging for aws, too much is logged under the default INFO
com.amazonaws: WARN
appender:
console:
type: console
layout:
type: consolePattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

View File

@@ -0,0 +1,5 @@
http.host: 0.0.0.0
# Uncomment the following lines for a production cluster deployment
#transport.host: 0.0.0.0
#discovery.zen.minimum_master_nodes: 1

View File

@@ -0,0 +1,9 @@
status = error
appender.console.type = Console
appender.console.name = console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
rootLogger.level = info
rootLogger.appenderRef.console.ref = console

View File

@@ -0,0 +1,43 @@
# /etc/mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
# how the process runs
processManagement:
timeZoneInfo: /usr/share/zoneinfo
security:
authorization: "enabled"
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:

View File

@@ -0,0 +1,3 @@
[mysqld]
skip-host-cache
skip-name-resolve

31
config/mysql/my.cnf Normal file
View File

@@ -0,0 +1,31 @@
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# The MySQL Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
secure-file-priv= NULL
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Custom config should go here
!includedir /etc/mysql/conf.d/

128
config/nginx/nginx.conf Normal file
View File

@@ -0,0 +1,128 @@
# /etc/nginx/nginx.conf
user www-data;
# you must set worker processes based on your CPU cores, nginx does not benefit from setting more than that
worker_processes 8; #some last versions calculate it automatically
# number of file descriptors used for nginx
# the limit for the maximum FDs on the server is usually set by the OS.
# if you don't set FD's then OS settings will be used which is by default 2000
# worker_rlimit_nofile 300000;
worker_rlimit_nofile 30000;
pid /run/nginx.pid;
# provides the configuration file context in which the directives that affect connection processing are specified.
events {
# determines how much clients will be served per worker
# max clients = worker_connections * worker_processes
# max clients is also limited by the number of socket connections available on the system (~64k)
# worker_connections 4000;
worker_connections 8192;
# optmized to serve many clients with each thread, essential for linux -- for testing environment
use epoll;
# accept as many connections as possible, may flood worker connections if set too low -- for testing environment
multi_accept on;
}
http {
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# cache informations about FDs, frequently accessed files
# can boost performance, but you need to test those values
open_file_cache max=200000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
# to boost I/O on HDD we can disable access logs
access_log off;
# copies data between one FD and other from within the kernel
# faster then read() + write()
sendfile on;
# send headers in one peace, its better then sending them one by one
tcp_nopush on;
# don't buffer data sent, good for small data bursts in real time
tcp_nodelay on;
##
# Gzip Settings
##
# reduce the data that needs to be sent over network -- for testing environment
gzip on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json application/xml;
gzip_disable msie6;
# allow the server to close connection on non responding client, this will free up memory
reset_timedout_connection on;
# request timed out -- default 60
# client_body_timeout 10;
# if client stop responding, free up memory -- default 60
send_timeout 2;
# server will close connection after this time -- default 75
keepalive_timeout 65;
# number of requests client can make over keep-alive -- for testing environment
keepalive_requests 100000;
types_hash_max_size 2048;
server_tokens off;
server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# ANTI DDoS
# limit the number of connections per single IP
limit_conn_zone $binary_remote_addr zone=conn_limit_per_ip:10m;
# limit the number of requests for a given session
limit_req_zone $binary_remote_addr zone=req_limit_per_ip:10m rate=5r/s;
# zone which we want to limit by upper values, we want limit whole server
server {
limit_conn conn_limit_per_ip 10;
limit_req zone=req_limit_per_ip burst=10 nodelay;
}
# if the request body size is more than the buffer size, then the entire (or partial)
# request body is written into a temporary file
client_body_buffer_size 128k;
# headerbuffer size for the request header from client -- for testing environment
client_header_buffer_size 300m;
# maximum number and size of buffers for large headers to read from client request
large_client_header_buffers 4 256k;
# read timeout for the request body from client -- for testing environment
client_body_timeout 3m;
# how long to wait for the client to send a request header -- for testing environment
client_header_timeout 3m;
fastcgi_buffers 64 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

0
config/nginx/phpfpm/.gitignore vendored Normal file
View File

View File

@@ -0,0 +1,34 @@
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name laradock.localhost;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
root /var/www/public;
index index.php;
client_max_body_size 25M;
fastcgi_read_timeout 1800;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass workspace:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location /php/fpm/status {
fastcgi_pass workspace:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
}

0
config/nginx/puma/.gitignore vendored Normal file
View File

View File

@@ -0,0 +1,65 @@
upstream faye_server {
server laradock.com:9292;
}
upstream production {
server unix:/home/deploy/laradock/current/tmp/sockets/puma-production.socket fail_timeout=0;
}
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name laradock.com;
root /home/deploy/laradock/current/public;
client_max_body_size 300M;
keepalive_timeout 120;
send_timeout 120;
underscores_in_headers on;
error_page 500 /500.html;
try_files /system/maintenance.html $uri/index.html $uri @puma;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_connect_timeout 43200000;
proxy_read_timeout 43200000;
proxy_send_timeout 43200000;
location ~ ^/(assets)/ {
root /home/deploy/laradock/current/public;
gzip_static on;
expires 1y;
add_header Cache-Control public;
break;
}
location @puma {
proxy_set_header X-Request-Start "t=${msec}000";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://production;
}
location /pub-sub {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://faye_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
if ($http_user_agent ~* (EasouSpider) ) {
return 403;
}
}

View File

@@ -0,0 +1,68 @@
upstream faye_server {
server laradock.com:9292;
}
upstream production {
server unix:/home/deploy/laradock/current/tmp/sockets/puma-production.socket fail_timeout=0;
}
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/star_laradock_com.pem;
ssl_certificate_key /etc/ssl/laradock.key;
server_name laradock.com;
root /home/deploy/laradock/current/public;
client_max_body_size 300M;
keepalive_timeout 120;
send_timeout 120;
error_page 500 /500.html;
try_files /system/maintenance.html $uri/index.html $uri @puma;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_connect_timeout 43200000;
proxy_read_timeout 43200000;
proxy_send_timeout 43200000;
location ~ ^/(assets)/ {
root /home/deploy/laradock/current/public;
gzip_static on;
expires 1y;
add_header Cache-Control public;
break;
}
location @puma {
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Request-Start "t=${msec}000";
proxy_set_header X-Forwarded-Forr $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://staging;
}
location /pub-sub {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://faye_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
if ($http_user_agent ~* (EasouSpider) ) {
return 403;
}
}

65
config/nginx/puma/staging Normal file
View File

@@ -0,0 +1,65 @@
upstream faye_server {
server laradock.localhost:9292;
}
upstream staging {
server unix:/home/deploy/laradock.dev/current/tmp/sockets/puma-staging.socket fail_timeout=0;
}
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name laradock.localhost;
root /home/deploy/laradock.dev/current/public;
client_max_body_size 300M;
keepalive_timeout 120;
send_timeout 120;
underscores_in_headers on;
error_page 500 /500.html;
try_files /system/maintenance.html $uri/index.html $uri @puma;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_connect_timeout 43200000;
proxy_read_timeout 43200000;
proxy_send_timeout 43200000;
location ~ ^/(assets)/ {
root /home/deploy/laradock.dev/current/public;
gzip_static on;
expires 1y;
add_header Cache-Control public;
break;
}
location @puma {
proxy_set_header X-Request-Start "t=${msec}000";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://staging;
}
location /pub-sub {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://faye_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
if ($http_user_agent ~* (EasouSpider) ) {
return 403;
}
}

View File

@@ -0,0 +1,68 @@
upstream faye_server {
server laradock.localhost:9292;
}
upstream staging {
server unix:/home/deploy/laradock.dev/current/tmp/sockets/puma-staging.socket fail_timeout=0;
}
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/star_laradock_com.pem;
ssl_certificate_key /etc/ssl/laradock.key;
server_name laradock.localhost;
root /home/deploy/laradock.dev/current/public;
client_max_body_size 300M;
keepalive_timeout 120;
send_timeout 120;
error_page 500 /500.html;
try_files /system/maintenance.html $uri/index.html $uri @puma;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_connect_timeout 43200000;
proxy_read_timeout 43200000;
proxy_send_timeout 43200000;
location ~ ^/(assets)/ {
root /home/deploy/laradock.dev/current/public;
gzip_static on;
expires 1y;
add_header Cache-Control public;
break;
}
location @puma {
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Request-Start "t=${msec}000";
proxy_set_header X-Forwarded-Forr $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://staging;
}
location /pub-sub {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://faye_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
if ($http_user_agent ~* (EasouSpider) ) {
return 403;
}
}

0
config/nginx/unicorn/.gitignore vendored Normal file
View File

View File

@@ -0,0 +1,65 @@
upstream faye_server {
server laradock.com:9292;
}
upstream production {
server unix:/home/deploy/laradock/current/tmp/sockets/unicorn-production.socket fail_timeout=0;
}
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name laradock.com;
root /home/deploy/laradock/current/public;
client_max_body_size 300M;
keepalive_timeout 120;
send_timeout 120;
underscores_in_headers on;
error_page 500 /500.html;
try_files /system/maintenance.html $uri/index.html $uri @unicorn;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_connect_timeout 43200000;
proxy_read_timeout 43200000;
proxy_send_timeout 43200000;
location ~ ^/(assets)/ {
root /home/deploy/laradock/current/public;
gzip_static on;
expires 1y;
add_header Cache-Control public;
break;
}
location @unicorn {
proxy_set_header X-Request-Start "t=${msec}000";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://production;
}
location /pub-sub {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://faye_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
if ($http_user_agent ~* (EasouSpider) ) {
return 403;
}
}

View File

@@ -0,0 +1,68 @@
upstream faye_server {
server laradock.com:9292;
}
upstream production {
server unix:/home/deploy/laradock/current/tmp/sockets/unicorn-production.socket fail_timeout=0;
}
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/star_laradock_com.pem;
ssl_certificate_key /etc/ssl/laradock.key;
server_name laradock.com;
root /home/deploy/laradock/current/public;
client_max_body_size 300M;
keepalive_timeout 120;
send_timeout 120;
error_page 500 /500.html;
try_files /system/maintenance.html $uri/index.html $uri @unicorn;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_connect_timeout 43200000;
proxy_read_timeout 43200000;
proxy_send_timeout 43200000;
location ~ ^/(assets)/ {
root /home/deploy/laradock/current/public;
gzip_static on;
expires 1y;
add_header Cache-Control public;
break;
}
location @unicorn {
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Request-Start "t=${msec}000";
proxy_set_header X-Forwarded-Forr $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://production;
}
location /pub-sub {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://faye_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
if ($http_user_agent ~* (EasouSpider) ) {
return 403;
}
}

View File

@@ -0,0 +1,65 @@
upstream faye_server {
server laradock.localhost:9292;
}
upstream staging {
server unix:/home/deploy/laradock.dev/current/tmp/sockets/unicorn-staging.socket fail_timeout=0;
}
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name laradock.localhost;
root /home/deploy/laradock.dev/current/public;
client_max_body_size 300M;
keepalive_timeout 120;
send_timeout 120;
underscores_in_headers on;
error_page 500 /500.html;
try_files /system/maintenance.html $uri/index.html $uri @unicorn;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_connect_timeout 43200000;
proxy_read_timeout 43200000;
proxy_send_timeout 43200000;
location ~ ^/(assets)/ {
root /home/deploy/laradock.dev/current/public;
gzip_static on;
expires 1y;
add_header Cache-Control public;
break;
}
location @unicorn {
proxy_set_header X-Request-Start "t=${msec}000";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://staging;
}
location /pub-sub {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://faye_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
if ($http_user_agent ~* (EasouSpider) ) {
return 403;
}
}

View File

@@ -0,0 +1,68 @@
upstream faye_server {
server laradock.localhost:9292;
}
upstream staging {
server unix:/home/deploy/laradock.dev/current/tmp/sockets/unicorn-staging.socket fail_timeout=0;
}
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/star_laradock_com.pem;
ssl_certificate_key /etc/ssl/laradock.key;
server_name laradock.localhost;
root /home/deploy/laradock.dev/current/public;
client_max_body_size 300M;
keepalive_timeout 120;
send_timeout 120;
error_page 500 /500.html;
try_files /system/maintenance.html $uri/index.html $uri @unicorn;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_connect_timeout 43200000;
proxy_read_timeout 43200000;
proxy_send_timeout 43200000;
location ~ ^/(assets)/ {
root /home/deploy/laradock.dev/current/public;
gzip_static on;
expires 1y;
add_header Cache-Control public;
break;
}
location @unicorn {
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Request-Start "t=${msec}000";
proxy_set_header X-Forwarded-Forr $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://staging;
}
location /pub-sub {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://faye_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
if ($http_user_agent ~* (EasouSpider) ) {
return 403;
}
}

0
config/nodejs/.gitignore vendored Normal file
View File

View File

@@ -0,0 +1,11 @@
;zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so
xdebug.remote_autostart=1
xdebug.remote_port=9090
xdebug.remote_host=127.0.0.1
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/var/log/xdebug
xdebug.remote_handler=dbgp
xdebug.remote_autostart=1
xdebug.remote_connect_back=0
xdebug.idekey=PHPSTORM

24
config/php/php-fpm.conf Normal file
View File

@@ -0,0 +1,24 @@
[global]
error_log = /var/log/php-fpm/fpm-error.log
daemonize = no
[www]
user = www-data
group = www-data
listen = [::]:9000
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.status_path = /php/fpm/status
clear_env = no
access.log = /var/log/php-fpm/access.log
access.format = "%t \"%m %r%Q%q\" %s %{mili}dms %{kilo}Mkb %C%%"
catch_workers_output = yes
php_flag[display_errors] = on
php_admin_value[date.timezone] = "Europe/London"

7
config/php/php.ini Normal file
View File

@@ -0,0 +1,7 @@
[PHP]
short_open_tag = off
[Date]
date.timezone = "Europe/London"
;zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so

0
config/phpmyadmin/.gitignore vendored Normal file
View File

View File

@@ -0,0 +1,156 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in documentation in the doc/ folder
* or at <https://docs.phpmyadmin.net/>.
*
* @package PhpMyAdmin
*/
/**
* This is needed for cookie based authentication to encrypt password in
* cookie. Needs to be 32 chars long.
*/
$cfg['blowfish_secret'] = 'abcdefghijklmnopqwertuvwxyz1234567890'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/**
* Servers configuration
*/
$i = 0;
/**
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'mariadb'; // mysql, mariadb, percona
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['user'] = 'laradock';
$cfg['Servers'][$i]['password'] = 'password';
/**
* phpMyAdmin configuration storage settings.
*/
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
// $cfg['Servers'][$i]['controluser'] = 'laradock';
// $cfg['Servers'][$i]['controlpass'] = 'password';
/* Storage database and tables */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma__relation';
// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
// $cfg['Servers'][$i]['history'] = 'pma__history';
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['Servers'][$i]['users'] = 'pma__users';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
/**
* End of servers configuration
*/
/**
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/**
* Whether to display icons or text or both icons and text in table row
* action segment. Value can be either of 'icons', 'text' or 'both'.
* default = 'both'
*/
//$cfg['RowActionType'] = 'icons';
/**
* Defines whether a user should be displayed a "show all (records)"
* button in browse mode or not.
* default = false
*/
//$cfg['ShowAll'] = true;
/**
* Number of rows displayed when browsing a result set. If the result
* set contains more rows, "Previous" and "Next".
* Possible values: 25, 50, 100, 250, 500
* default = 25
*/
//$cfg['MaxRows'] = 50;
/**
* Disallow editing of binary fields
* valid values are:
* false allow editing
* 'blob' allow editing except for BLOB fields
* 'noblob' disallow editing except for BLOB fields
* 'all' disallow editing
* default = 'blob'
*/
//$cfg['ProtectBinary'] = false;
/**
* Default language to use, if not browser-defined or user-defined
* (you find all languages in the locale folder)
* uncomment the desired line:
* default = 'en'
*/
//$cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';
/**
* How many columns should be used for table display of a database?
* (a value larger than 1 results in some information being hidden)
* default = 1
*/
//$cfg['PropertiesNumColumns'] = 2;
/**
* Set to true if you want DB-based query history.If false, this utilizes
* JS-routines to display query history (lost by window close)
*
* This requires configuration storage enabled, see above.
* default = false
*/
//$cfg['QueryHistoryDB'] = true;
/**
* When using DB-based query history, how many entries should be kept?
* default = 25
*/
//$cfg['QueryHistoryMax'] = 100;
/**
* Whether or not to query the user before sending the error report to
* the phpMyAdmin team when a JavaScript error occurs
*
* Available options
* ('ask' | 'always' | 'never')
* default = 'ask'
*/
//$cfg['SendErrorReports'] = 'always';
/**
* You can find more configuration options in the documentation
* in the doc/ folder or at <https://docs.phpmyadmin.net/>.
*/

0
config/postgresql/.gitignore vendored Normal file
View File

0
config/redis/.gitignore vendored Normal file
View File

0
config/ruby/.gitignore vendored Normal file
View File

0
config/vim/.gitignore vendored Normal file
View File