#--------------------------------------------------------------------
# TIEASY environment example
# Copy this file to `.env` and replace every placeholder.
#   cp env .env
# Generate an encryption key:
#   php spark key:generate
#--------------------------------------------------------------------

# development | testing | production
CI_ENVIRONMENT = development

#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------
# Trailing slash required. Use https://tieasy.example.com/ in production.
app.baseURL = 'http://127.0.0.1:43123/'
app.indexPage = ''
app.appTimezone = UTC
app.forceGlobalSecureRequests = false
app.CSPEnabled = false

# Production HTTPS example (uncomment on the VPS):
# CI_ENVIRONMENT = production
# app.baseURL = 'https://tieasy.example.com/'
# app.appTimezone = UTC
# app.forceGlobalSecureRequests = true
# cookie.secure = true

#--------------------------------------------------------------------
# DATABASE (MySQL 8+)
#--------------------------------------------------------------------
database.default.hostname = 127.0.0.1
database.default.database = tieasy
database.default.username = your_db_user
database.default.password = your_db_password
database.default.DBDriver = MySQLi
database.default.DBPrefix =
database.default.port = 3306
database.default.charset = utf8mb4
database.default.DBCollat = utf8mb4_unicode_ci

# PHPUnit uses the tests group. Never point this at production.
database.tests.hostname = 127.0.0.1
database.tests.database = tieasy_test
database.tests.username = your_test_db_user
database.tests.password = your_test_db_password
database.tests.DBDriver = MySQLi
database.tests.port = 3306

#--------------------------------------------------------------------
# ENCRYPTION
# Leave empty here. Run `php spark key:generate` after copying to `.env`.
#--------------------------------------------------------------------
encryption.key =

#--------------------------------------------------------------------
# SESSION / COOKIES
# Persistent login uses HttpOnly cookie `tieasy_remember`.
# File sessions always live in writable/session (never under public/).
# Do not set session.savePath to null or a relative path.
# Production Cookie config forces Secure when CI_ENVIRONMENT = production.
#--------------------------------------------------------------------
session.driver = 'CodeIgniter\Session\Handlers\FileHandler'
session.expiration = 7200
cookie.httponly = true
cookie.samesite = 'Lax'
cookie.secure = false

#--------------------------------------------------------------------
# EMAIL / SMTP (OTP delivery)
# Production MUST use protocol = smtp. mailbox is local-only.
#--------------------------------------------------------------------
email.fromEmail = noreply@example.com
email.fromName = TIEASY
email.protocol = mailbox
email.SMTPHost = smtp.example.com
email.SMTPUser =
email.SMTPPass =
email.SMTPPort = 587
email.SMTPCrypto = tls

#--------------------------------------------------------------------
# LOGGER
#--------------------------------------------------------------------
logger.threshold = 4
