PHP Classes

File: .env.example

Recommend this page to a friend!
  Classes of Ramesh Narayan Jangid (Sharma)   PHP Microservices Framework   .env.example   Download  
File: .env.example
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Microservices Framework
Setup microservices apps with configuration arrays
Author: By
Last change: QueryPlaceholder
Parameterized Param
Date: 1 month ago
Size: 7,381 bytes
 

Contents

Class file image Download
ENVIRONMENT=0 ; Environment PRODUCTION = 1 / DEVELOPMENT = 0 OUTPUT_PERFORMANCE_STATS=1 ; Add Performance Stats in JSON output: 1 = true / 0 = false DISABLE_REQUESTS_VIA_PROXIES=1 ; 1 = true / 0 = false ; API authentication modes - Token / Session (Cookie based Sessions) authMode='Token' sessionMode='File' ; For Cookie based Session - 'File', 'MySql', 'PostgreSql', 'MongoDb', 'Redis', 'Memcached', 'Cookie' ; Data Representation: JSON/XML/HTML iRepresentation='JSON' ; JSON/XML - Input Data Representation oRepresentation='JSON' ; JSON/XML/HTML - Output Data Representation allowRepresentationAsQueryParam=1 ; Allow iRepresentation / oRepresentation as GET query params ; Sql Placeholders queryPlaceholder=Named ; Named(:param) / Unnamed(?) ; ; Route related config (to allow / now to allow) settings ; ; Allow particular route config request (global flag) ; Useful to get details of the payload necessary by the API allowConfigRequest=1 ; 1 = true / 0 = false configRequestRouteKeyword='config' ; to append "/config" at the end of route ; Allow import CSV - 1 = true / 0 = false allowImportRequest=1 ; 1 = true / 0 = false importRequestRouteKeyword='import' ; to append "/import" at the end of route importSampleRouteKeyword='import-sample' ; Similarly allowCronRequest=1 ; 1 = true / 0 = false cronRequestRoutePrefix='cron' cronRestrictedCidr='127.0.0.1' allowRoutesRequest=1 ; 1 = true / 0 = false routesRequestRoute='routes' allowCustomRequest=1 ; 1 = true / 0 = false customRequestRoutePrefix='custom' allowUploadRequest=1 ; 1 = true / 0 = false uploadRequestRoutePrefix='upload' allowThirdPartyRequest=1 ; 1 = true / 0 = false thirdPartyRequestRoutePrefix='thirdParty' allowCacheRequest=1 ; 1 = true / 0 = false cacheRequestRoutePrefix='cdn' ; Export CSV allowExport=1 ; 1 = true / 0 = false mySqlBinaryLocationOnWebServer='/usr/local/bin/mysql' ; Default perPage (records per page) defaultPerPage=10 maxResultsPerPage=1000 ; Global Auto-Increment counter details useGlobalCounter=0 ; 1 = true / 0 = false gCounter='m000_counter' ; Key or Table gCounterMode='Cache' ; Globally configured Cache / Database ; Settings to avoid Idempotent requests IdempotentSecret='changeme' ; hash_hmac secret ; Settings to activate IP restrictions set against Client/Group/User activateCidrChecks=0 ; 1 = true / 0 = false ; ; Cache related configs ; ; ---- Rate Limit Server Details (Redis) ; used to save Rate Limiting related details ; Supported Containers - Memcached / Redis without AUTH rateLimitServerType='Memcached' ; Redis/Memcached host dealing for Rate limit rateLimitServerHostname='127.0.0.1' ; Redis host dealing with Rate limit rateLimitServerPort=11211 ; Redis-6379 / Memcached-11211 enableRateLimitAtIpLevel=0 ; 1 = true / 0 = false rateLimitIPMaxRequests=600 ; Max request allowed per IP rateLimitIPSecondsWindow=300 ; Window in seconds of Max request allowed per IP rateLimitIPPrefix='IPRL:' ; Rate limit open traffic (not limited by allowed IPs/CIDR and allowed Rate Limits to users) enableRateLimitAtClientLevel=0 ; 1 = true / 0 = false rateLimitClientPrefix='CRL:' ; Client based Rate Limitng (GRL) key prefix used in Redis enableRateLimitAtGroupLevel=0 ; 1 = true / 0 = false rateLimitGroupPrefix='GRL:' ; Group based Rate Limitng (GRL) key prefix used in Redis enableRateLimitAtUserLevel=0 ; 1 = true / 0 = false rateLimitUserPrefix='URL:' ; User based Rate Limitng (URL) key prefix used in Redis enableRateLimitAtRouteLevel=0 ; 1 = true / 0 = false rateLimitRoutePrefix='RRL:' ; Route based Rate Limiting (RRL) key prefix used in Redis ; User Per IP based Rate Limiting enableRateLimitAtUsersPerIpLevel=0 ; 1 = true / 0 = false rateLimitUsersPerIpPrefix='UIRL:' ; User Per IP based Rate Limiting (UIRL) key prefix used in Redis rateLimitUsersPerIpMaxUsers=10 ; Max Users allowed per IP rateLimitUsersPerIpSecondsWindow=300; Window in seconds of Max Users allowed per IP ; Delay Between Consecutive Requests (allow n requests only for seconds configured for each user) enableRateLimitAtUsersRequestLevel=0; 1 = true / 0 = false rateLimitUsersRequestPrefix='URRL:' ; User Per IP based Rate Limiting (UIRL) key prefix used in Redis rateLimitUsersMaxRequests=1 ; Max one request allowed for 10 seconds rateLimitUsersMaxRequestsWindow=10 ; Max one request allowed for 10 seconds ; ---- Api Gateway ; user <username> allcommands allkeys on ><password> ; used to save user and token related details ; Supported Containers - Redis / Memcached / MongoDb gCacheServerType='Redis' gCacheServerHostname='127.0.0.1' gCacheServerPort=6379 gCacheServerUsername='ramesh' gCacheServerPassword='shames11' gCacheServerDatabase=0 gCacheServerTable='global_cache' ; For MongoDb # gCacheServerType='Memcached' # gCacheServerHostname='127.0.0.1' # gCacheServerPort=11211 # gCacheServerUsername='' # gCacheServerPassword='' # gCacheServerDatabase='' # gCacheServerTable='global_cache' ; For MongoDb ; ; Database related configs ; ; --- Global Database ; Supported Containers - MySql / PostgreSql ; Global Database details - global.sql ; Supported Containers - MySql / PostgreSql gDbServerType='MySql' gDbServerHostname='127.0.0.1' gDbServerPort=3306 gDbServerUsername='root' gDbServerPassword='shames11' gDbServerDatabase='global' gDbServerQueryPlaceholder=Named ; Named(:param) / Unnamed(?) ; Tables clients='m001_master_clients' groups='m002_master_groups' ; client_master on global MySql server clientMasterDbName='client_master' ; contains all entities necessary for a new client ; --- Client Databases ; Supported Containers - MySql / PostgreSql ; Client Database table containing user login details clientUsers='master_users' ; ------ Default Client Database -------- ; Details of default database shared by all client ; Supported Containers - MySql / PostgreSql cDbServerType='MySql' cDbServerHostname='127.0.0.1' cDbServerPort=3306 cDbServerUsername='root' cDbServerPassword='shames11' cDbServerDatabase='common' cDbServerQueryPlaceholder=Named ; Named(:param) / Unnamed(?) ; ///////////////// ADD MORE CONFIG DETAILS BELOW ///////////////// ; ------ Dedicated Database for Client 001 -------- ; Dedicated database for each client on single host ; Only database changes rest detail remains same. ; Supported Containers - MySql / PostgreSql cDbServerType001='MySql' cDbServerHostname001='127.0.0.1' cDbServerPort001=3306 cDbServerUsername001='root' cDbServerPassword001='shames11' cDbServerDatabase001='client_001' cDbServerQueryPlaceholder001=Named ; Named(:param) / Unnamed(?) ; ---- Query cache for cache hit of generated APIs output ; Supported Containers - Redis / Memcached / MySql / PostgreSql / MongoDb sqlResultsCacheServerType='Redis' sqlResultsCacheServerHostname='127.0.0.1' sqlResultsCacheServerPort=6379 sqlResultsCacheServerUsername='ramesh' sqlResultsCacheServerPassword='shames11' sqlResultsCacheServerDatabase=0 sqlResultsCacheServerTable='api_cache' ; For MySql / PostgreSql / MongoDb