Updated CI configuration

This commit is contained in:
Gregorio Chiko Putra
2018-07-30 09:31:58 +07:00
parent eee570125d
commit ed701d9a63
12 changed files with 387 additions and 140 deletions

View File

@@ -169,6 +169,7 @@ return [
*/
Spatie\Permission\PermissionServiceProvider::class,
Nwidart\Modules\LaravelModulesServiceProvider::class,
Flugg\Responder\ResponderServiceProvider::class,
/*
* Application Service Providers...
@@ -227,6 +228,8 @@ return [
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Responder' => Flugg\Responder\Facades\Responder::class,
'Transformation' => Flugg\Responder\Facades\Transformation::class,
],

32
config/laravel Normal file
View File

@@ -0,0 +1,32 @@
server {
listen 80;
listen [::]:80;
server_name laraland.test;
root /var/www/laraland/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass php-upstream;
fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
location /.well-known/acme-challenge/ {
root /var/www/letsencrypt/;
log_not_found off;
}
}

4
config/nginx-start.sh Normal file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
cp /opt/etc/nginx.conf /etc/nginx/nginx.conf
sed -i "s/%fpm-ip%/$FPM_PORT_9000_TCP_ADDR/" /etc/nginx/nginx.conf
exec /usr/sbin/nginx

34
config/nginx.conf Normal file
View File

@@ -0,0 +1,34 @@
user www-data;
worker_processes 4;
pid /run/nginx.pid;
daemon off;
events {
worker_connections 2048;
multi_accept on;
use epoll;
}
http {
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
types_hash_max_size 2048;
client_max_body_size 20M;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /dev/stdout;
error_log /dev/stderr;
gzip on;
gzip_disable "msie6";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-available/*.conf;
open_file_cache off; # Disabled for issue 619
charset UTF-8;
}

102
config/responder.php Normal file
View File

@@ -0,0 +1,102 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Serializer Class Paths
|--------------------------------------------------------------------------
|
| The full class path to the serializer classes you want to use for both
| success- and error responses. The success serializer must implement
| Fractal's serializer. You can override these for every response.
|
*/
'serializers' => [
'success' => Flugg\Responder\Serializers\SuccessSerializer::class,
'error' => \Flugg\Responder\Serializers\ErrorSerializer::class,
],
/*
|--------------------------------------------------------------------------
| Response Decorators
|--------------------------------------------------------------------------
|
| Response decorators are used to decorate both your success- and error
| responses. A decorator can be disabled by removing it from the list
| below. You may additionally add your own decorators to the list.
|
*/
'decorators' => [
\Flugg\Responder\Http\Responses\Decorators\StatusCodeDecorator::class,
\Flugg\Responder\Http\Responses\Decorators\SuccessFlagDecorator::class,
],
/*
|--------------------------------------------------------------------------
| Fallback Transformer
|--------------------------------------------------------------------------
|
| When transforming data without specifying a transformer we'll instead
| use a fallback transformer specified below. The [ArrayTransformer]
| transformer will simply convert the data to an array untouched.
|
*/
'fallback_transformer' => \Flugg\Responder\Transformers\ArrayTransformer::class,
/*
|--------------------------------------------------------------------------
| Load Relationships With Query String Parameter
|--------------------------------------------------------------------------
|
| The package can automatically load relationships from the query string
| and will look for a query string parameter with the name configured
| below. You can set the value to null to disable the autoloading.
|
*/
'load_relations_parameter' => 'with',
/*
|--------------------------------------------------------------------------
| Filter Fields With Query String Parameter
|--------------------------------------------------------------------------
|
| The package can automatically filter the fields of transformed data
| from a query string parameter configured below. The technique is
| also known as sparse fieldsets. Set it to null to disable it.
|
*/
'filter_fields_parameter' => 'only',
/*
|--------------------------------------------------------------------------
| Recursion Limit
|--------------------------------------------------------------------------
|
| When transforming data, you may be including relations recursively.
| By setting the value below, you can limit the amount of times it
| should include relationships recursively. Five might be good.
|
*/
'recursion_limit' => 5,
/*
|--------------------------------------------------------------------------
| Error Message Translation Files
|--------------------------------------------------------------------------
|
| You can declare error messages in a language file, which allows for
| returning messages in different languages. The array below lists
| the language files that will be searched in to find messages.
|
*/
'error_message_files' => ['errors'],
];