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: refactor
Date: 2 days ago
Size: 8,700 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 enableRepresentationAsQueryParam=1 ; Allow iRepresentation / oRepresentation as GET query params enablePayloadInResponse=1 ; 1 = true / 0 = false payloadKeyInResponse='Payload' ; ; Cache related configs ; ; ---- Rate Limiting enable/disable Config enableRateLimiting=1 ; 1 = true / 0 = false enableRateLimitAtIpLevel=0 ; 1 = true / 0 = false enableRateLimitAtClientLevel=0 ; 1 = true / 0 = false enableRateLimitAtGroupLevel=0 ; 1 = true / 0 = false enableRateLimitAtUserLevel=0 ; 1 = true / 0 = false enableRateLimitAtRouteLevel=0 ; 1 = true / 0 = false enableRateLimitAtUsersPerIpLevel=0 ; 1 = true / 0 = false enableRateLimitAtUsersRequestLevel=0; 1 = true / 0 = false ; ---- Rate Limit Server Details (Redis) ; 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 ; Rate Limiting Key Prefix rateLimitIPPrefix='IPRL:' ; Rate limit open traffic (not limited by allowed IPs/CIDR and allowed Rate Limits to users) rateLimitClientPrefix='CRL:' ; Client based Rate Limitng (GRL) key prefix used in Redis rateLimitGroupPrefix='GRL:' ; Group based Rate Limitng (GRL) key prefix used in Redis rateLimitUserPrefix='URL:' ; User based Rate Limitng (URL) key prefix used in Redis rateLimitRoutePrefix='RRL:' ; Route based Rate Limiting (RRL) key prefix used in Redis rateLimitUsersPerIpPrefix='UIRL:' ; User Per IP based Rate Limiting (UIRL) key prefix used in Redis rateLimitUsersRequestPrefix='URRL:' ; User Per IP based Rate Limiting (UIRL) key prefix used in Redis ; Rate Limiting No. of Requests per IP ('IPRL:') rateLimitIPMaxRequests=600 ; Max request allowed per IP rateLimitIPSecondsWindow=300 ; Window in seconds of Max request allowed per IP ; Rate Limiting No. of User Per IP ('UIRL:') rateLimitUsersPerIpMaxUsers=10 ; Max Users allowed per IP rateLimitUsersPerIpSecondsWindow=300; Window in seconds of Max Users allowed per IP ; Rate Limiting No. of Requests per User ('URRL:') ; Delay Between Consecutive Requests (allow n requests only for seconds configured for each user) rateLimitUsersMaxRequests=1 ; Max one request allowed for 10 seconds rateLimitUsersMaxRequestsWindow=10 ; Max one request allowed for 10 seconds ; ; 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 ;; ========================================== ; Request Payload Config enableConfigRequest=1 ; 1 = true / 0 = false ; Export CSV enableExportRequest=1 ; 1 = true / 0 = false ; Import CSV enableImportRequest=1 ; 1 = true / 0 = false ; Import CSV Sample enableImportSampleRequest=1 ; 1 = true / 0 = false ; Listing available routes enableRoutesRequest=1 ; 1 = true / 0 = false ; Supplement feature controls enableCacheRequest=1 ; 1 = true / 0 = false enableCronRequest=1 ; 1 = true / 0 = false enableCustomRequest=1 ; 1 = true / 0 = false enableReloadRequest=1 ; 1 = true / 0 = false enableThirdPartyRequest=1 ; 1 = true / 0 = false enableUploadRequest=1 ; 1 = true / 0 = false ;; Enabled detials configuration ;; Keyword to append with in route with slash ;; ========================================== ; Request Payload Config configRequestRouteKeyword='config' ; to append "/config" at the end of route ; Export CSV mySqlBinaryLocationOnWebServer='/usr/local/bin/mysql' ; Import CSV importRequestRouteKeyword='import' ; to append "/import" at the end of route ; Import CSV Sample importSampleRequestRouteKeyword='import-sample' ; Listing available routes routesRequestRoute='routes' ; Supplement feature Prefix cacheRequestRoutePrefix='cdn' cronRequestRoutePrefix='cron' customRequestRoutePrefix='custom' reloadRequestRoutePrefix='reload' thirdPartyRequestRoutePrefix='thirdParty' uploadRequestRoutePrefix='upload' ; CIDRs check config ; Settings to activate IP restrictions set against Client/Group/User enableCidrChecks=0 ; 1 = true / 0 = false ;; ========================================== ; Request Payload Config configRestrictedCidr='0.0.0.0/0' ; Export CSV exportRestrictedCidr='0.0.0.0/0' ; Import CSV importRestrictedCidr='0.0.0.0/0' ; Import CSV Sample importSampleRestrictedCidr='0.0.0.0/0' ; Listing available routes routesRestrictedCidr='0.0.0.0/0' ; Supplement cacheRestrictedCidr='0.0.0.0/0' cronRestrictedCidr='0.0.0.0/0' customRestrictedCidr='0.0.0.0/0' reloadRestrictedCidr='0.0.0.0/0' thirdPatyRestrictedCidr='0.0.0.0/0' uploadRestrictedCidr='0.0.0.0/0' ; ---- (Global cache server) 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 clientsTable='clients' groupsTable='groups' ; Master database on global MySql server masterDatabase='master' ; contains all entities necessary for a new client ; Sql query placeholder queryPlaceholder=Named ; Named(:param) / Unnamed(?) ; Default perPage (records per page) defaultPerPage=10 maxResultsPerPage=1000 ; Global Auto-Increment counter details enableGlobalCounter=0 ; 1 = true / 0 = false gCounter='global_counter' ; Key or Table gCounterMode='Cache' ; Globally configured Cache / Database ; Settings to avoid Idempotent requests IdempotentSecret='changeme' ; hash_hmac secret ; --- Client Databases ; Supported Containers - MySql / PostgreSql ; Client Database table containing user login details clientUsersTable='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