mirror of
https://github.com/manualdousuario/marreta.git
synced 2025-09-02 18:51:06 +00:00
configurações s3
This commit is contained in:
parent
ca6b2413e2
commit
d2964e93cb
3 changed files with 32 additions and 1 deletions
|
@ -18,3 +18,13 @@ DNS_SERVERS='94.140.14.14,94.140.15.15'
|
||||||
# Modo de debug (true/false)
|
# Modo de debug (true/false)
|
||||||
# Quando ativo, desativa o cache do sistema
|
# Quando ativo, desativa o cache do sistema
|
||||||
DEBUG=false
|
DEBUG=false
|
||||||
|
|
||||||
|
# Configurações de Cache S3
|
||||||
|
S3_CACHE_ENABLED=false
|
||||||
|
S3_ACCESS_KEY=
|
||||||
|
S3_SECRET_KEY=
|
||||||
|
S3_BUCKET=
|
||||||
|
S3_REGION=us-east-1
|
||||||
|
S3_PREFIX=cache/
|
||||||
|
S3_ACL=private
|
||||||
|
S3_ENDPOINT=
|
|
@ -1,5 +1,11 @@
|
||||||
{
|
{
|
||||||
"require": {
|
"require": {
|
||||||
"vlucas/phpdotenv": "^5.6.1"
|
"vlucas/phpdotenv": "^5.6.1",
|
||||||
|
"aws/aws-sdk-php": "^3.0"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Inc\\": "inc/"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
* - Mensagens do sistema
|
* - Mensagens do sistema
|
||||||
* - Configurações de bots e user agents
|
* - Configurações de bots e user agents
|
||||||
* - Lista de domínios bloqueados
|
* - Lista de domínios bloqueados
|
||||||
|
* - Configurações de cache S3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__ . '/vendor/autoload.php';
|
require_once __DIR__ . '/vendor/autoload.php';
|
||||||
|
@ -29,6 +30,20 @@ define('DNS_SERVERS', isset($_ENV['DNS_SERVERS']) ? $_ENV['DNS_SERVERS'] : '94.1
|
||||||
define('CACHE_DIR', __DIR__ . '/cache');
|
define('CACHE_DIR', __DIR__ . '/cache');
|
||||||
define('DEBUG', isset($_ENV['DEBUG']) ? filter_var($_ENV['DEBUG'], FILTER_VALIDATE_BOOLEAN) : false);
|
define('DEBUG', isset($_ENV['DEBUG']) ? filter_var($_ENV['DEBUG'], FILTER_VALIDATE_BOOLEAN) : false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configurações de Cache S3
|
||||||
|
*/
|
||||||
|
define('S3_CACHE_ENABLED', isset($_ENV['S3_CACHE_ENABLED']) ? filter_var($_ENV['S3_CACHE_ENABLED'], FILTER_VALIDATE_BOOLEAN) : false);
|
||||||
|
if (S3_CACHE_ENABLED) {
|
||||||
|
define('S3_ACCESS_KEY', $_ENV['S3_ACCESS_KEY'] ?? '');
|
||||||
|
define('S3_SECRET_KEY', $_ENV['S3_SECRET_KEY'] ?? '');
|
||||||
|
define('S3_BUCKET', $_ENV['S3_BUCKET'] ?? '');
|
||||||
|
define('S3_REGION', $_ENV['S3_REGION'] ?? 'us-east-1');
|
||||||
|
define('S3_PREFIX', $_ENV['S3_PREFIX'] ?? 'cache/');
|
||||||
|
define('S3_ACL', $_ENV['S3_ACL'] ?? 'private');
|
||||||
|
define('S3_ENDPOINT', $_ENV['S3_ENDPOINT'] ?? null);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Carrega as configurações do sistema
|
* Carrega as configurações do sistema
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue