Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Latest commit

 

History

History
65 lines (49 loc) · 3.86 KB

dotenv.md

File metadata and controls

65 lines (49 loc) · 3.86 KB

Table of Contents:

Database settings

Name Desc Default Value Options Note
DB_ENGINE PDO Engine mysql The app depends on mariadb/mysql
DB_HOST Host of the database db ip-address, hostname, docker-container When using docker on the same host as the app, you have to use the docker-container-name as host
DB_PORT Port 3306
DB_DATABASE Schema/database jmp If you change this, you also have to update all db init files
DB_USERNAME Username jmp_user
DB_PASSWORD Password pass4dev
Name Desc Default Value Options Note
MYSQL_ROOT_PASSWORD Mysql root password jmp_docker_local See: mariadb docker documentation. Change in production!

App settings

App specific

Name Desc Default Value Options Note
APP_NAME Application Name jmp Same as set in composer.json at the autoload section
APP_ENV Environment dev dev, test, stage, prod Defines the environment
APP_DEBUG Debugging true true, false Display error details as explained in Slim Default Settings. Not recommended for production environments
APP_URL URL of the application http://localhost Issuer of the jwt
APP_LOG_LEVEL Logging level debug Monolog Log Levels (case insensitive)
APP_LOG_STDOUT Logging to stdout true true, false If set to true, you can use docker logs app
APP_LOG_FILE Log file log/app.log File must be located in api/ or a subdirectory, else php won't have the necessary permissions and will throw an exception
APP_ROUTER_CACHE_FILE Cache file false cache/routes.cache.php or false File must be located in api/ or a already existing subdirectory, else php won't have the necessary permissions and will throw an exception Read more about slim's cache file

JWT

Name Desc Default Value Options Note
JWT_SECRET JWT Signature supersecretkeyyoushouldnotcommittogithub Generate a new private secret! Read more at stackoverflow. You can use openssl to generate a secret. HS256/HMAC is used for signing the jwt
JWT_SECURE https only false true, false read more
JWT_EXPIRATION validity in minutes 7200 Any integer greater than 0

CORS

Read more: CORS

Name Desc Default Value Options Note
CORS_ALLOWED_ORIGINS Allowed Origins "*" Comma seperated list of URLs as string
CORS_ALLOWED_HEADERS Allowed Headers "X-Requested-With, Content-Type, Accept, Origin, Authorization" Comma seperated list of Headers as string
CORS_ALLOWED_METHODS Allowed Methods "GET, POST, PUT, DELETE" Comma separated list of Methods as string