Lint / UI screenshots (before/after) (push) Skipped
Lint / JS (eslint) (push) Successful in 16s
Lint / PHP (phpcs PSR-12) (push) Successful in 30s
Lint / PHP requirements (version + extensions) (push) Successful in 50s
Lint / UI (playwright) (push) Successful in 3m29s
Lint / Deploy (push) Skipped
Lint / Notify on failure (push) Skipped
Security / PHP Security (semgrep) (push) Successful in 2m59s
Lint / JS (eslint) (pull_request) Successful in 16s
Lint / PHP (phpcs PSR-12) (pull_request) Successful in 33s
Lint / PHP requirements (version + extensions) (pull_request) Successful in 32s
Lint / UI (playwright) (pull_request) Successful in 2m23s
Lint / Deploy (pull_request) Skipped
Lint / Notify on failure (pull_request) Skipped
Security / PHP Security (semgrep) (pull_request) Successful in 1m32s
Lint / UI screenshots (before/after) (pull_request) Successful in 4m14s
New UI (playwright) job: PHP and MariaDB inside the Playwright image, a seeded instance (tests/ui/stack.sh, synthetic data only) and 21 tests: every main page loads with no page errors, console errors or failed requests, description and comment markdown render safely (#114), and pages fit a phone screen. Deploys now wait for it. New UI screenshots (before/after) job: for PRs that change assets/ or views/, runs the base branch and the PR side by side with the same data and uploads one side-by-side PNG per page and view (dark, light, phone). Modelled on Pulse's ui and ui-screenshots jobs. Fixes found while building it: - migrate.php split statements on semicolons inside -- comments, so 001 and 003 failed on a fresh database. - API endpoints applied rate limiting before loading config, so RATE_LIMIT_DEFAULT/RATE_LIMIT_API from .env and TRUSTED_PROXIES were ignored there: every user behind the proxy shared one per-IP bucket. The limiter now loads config itself; the per-IP limits are configurable (RATE_LIMIT_IP, RATE_LIMIT_IP_API) with unchanged defaults. - The avatar error fallback was registered in the footer, after the header avatar, so a fast 404 left a broken image instead of initials. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
101 lines
4.4 KiB
Bash
101 lines
4.4 KiB
Bash
; Tinker Tickets Environment Configuration
|
|
; Copy this file to .env and fill in your values
|
|
;
|
|
; NOTE: This file is parsed with PHP's parse_ini_file. Any value containing
|
|
; special characters -- #, ;, =, quotes, spaces, etc. -- MUST be wrapped in
|
|
; double quotes, e.g. DB_PASS="p@ss;word#1". The application now fails loudly
|
|
; -- dies with a clear error -- if the .env file cannot be parsed, so an
|
|
; unquoted special character will take the whole app down rather than
|
|
; silently using a wrong value.
|
|
;
|
|
; Comments in this file use ";" rather than "#": PHP's ini parser treats "#"
|
|
; comments as fragile -- punctuation like parentheses or quotes inside a "#"
|
|
; comment can produce a syntax error even though the line is meant to be
|
|
; inert, silently breaking every value below it. ";" comments don't have this
|
|
; problem, so keep using ";" for any comment added to this file.
|
|
|
|
; Database Configuration
|
|
DB_HOST=10.10.10.50
|
|
DB_USER=tinkertickets
|
|
DB_PASS=your_password_here
|
|
DB_NAME=ticketing_system
|
|
|
|
; Matrix Webhook (optional - for notifications via matrix-hookshot)
|
|
; Set to your hookshot generic webhook URL, e.g.:
|
|
; https://matrix.lotusguild.org/webhook/uuid-goes-here
|
|
MATRIX_WEBHOOK_URL=
|
|
|
|
; Matrix users to @mention on every new ticket (comma-separated Matrix user IDs)
|
|
; e.g. @jared:matrix.lotusguild.org,@alice:matrix.lotusguild.org
|
|
MATRIX_NOTIFY_USERS=
|
|
|
|
; Matrix homeserver domain (used to build Matrix user IDs from LLDAP usernames)
|
|
MATRIX_DOMAIN=
|
|
|
|
; Synapse internal URL and admin token (used to resolve usernames -> Matrix IDs
|
|
; for watcher DMs)
|
|
SYNAPSE_ADMIN_URL=
|
|
SYNAPSE_ADMIN_TOKEN=
|
|
|
|
; Optional: send a Matrix notification on comments and/or assignments (0/1)
|
|
MATRIX_NOTIFY_COMMENTS=0
|
|
MATRIX_NOTIFY_ASSIGNMENTS=0
|
|
|
|
; Application Domain (required for Matrix webhook ticket links)
|
|
; Set this to your public domain, e.g. t.lotusguild.org
|
|
APP_DOMAIN=
|
|
|
|
; Allowed Hosts for HTTP_HOST validation (comma-separated)
|
|
; Include all domains that can access this application
|
|
ALLOWED_HOSTS=localhost,127.0.0.1
|
|
|
|
; ============================================================================
|
|
; REQUIRED FOR PRODUCTION -- READ BEFORE DEPLOYING -- TRUSTED_PROXIES
|
|
; ============================================================================
|
|
; Trusted reverse proxy IPs, comma-separated -- e.g. the Authelia/nginx proxy.
|
|
; Set this to the IP address(es) of your reverse proxy. Authelia forward-auth
|
|
; headers (Remote-User / Remote-Groups) and forwarded client IPs are only
|
|
; trusted when REMOTE_ADDR is in this list.
|
|
;
|
|
; Leaving this EMPTY disables reverse-proxy verification entirely: the app then
|
|
; trusts Remote-User / Remote-Groups headers from ANY source. If the PHP
|
|
; backend is reachable directly -- a misconfigured firewall rule, a container
|
|
; network accidentally exposing the port, SSRF from another internal service
|
|
; -- ANYONE can set Remote-User: admin themselves and fully impersonate any
|
|
; user, including an admin, with ZERO authentication. Only leave it empty when
|
|
; network topology guarantees PHP is reachable solely via the trusted proxy
|
|
; (e.g. local development), never in a real deployment.
|
|
;
|
|
; Exact IP match only (no CIDR). Example (single proxy): TRUSTED_PROXIES=10.10.10.27
|
|
; Example (multiple): TRUSTED_PROXIES=10.10.10.27,10.10.10.28
|
|
; ============================================================================
|
|
TRUSTED_PROXIES=
|
|
|
|
; Timezone (default: America/New_York)
|
|
TIMEZONE=America/New_York
|
|
|
|
; LDAP / lldap (for user avatar lookups). Connects over LDAPS — 6360 is
|
|
; lldap's default LDAPS port, NOT its plaintext port (3890), since
|
|
; LDAP_BIND_PW below would otherwise go over the wire unencrypted.
|
|
; LDAP_HOST must be a hostname matching the LDAPS cert (TLS hostname
|
|
; verification is not skipped), not a bare IP.
|
|
LDAP_ENABLED=true
|
|
LDAP_HOST=ldap.lotusguild.org
|
|
LDAP_PORT=6360
|
|
LDAP_BIND_DN="uid=tinker-tickets,ou=people,dc=example,dc=com"
|
|
LDAP_BIND_PW=
|
|
LDAP_BASE_DN="dc=example,dc=com"
|
|
LDAP_USER_BASE="ou=people,dc=example,dc=com"
|
|
; How long to cache avatar images locally (seconds, default 3600)
|
|
AVATAR_CACHE_TTL=3600
|
|
|
|
; Session-based rate limits (requests per 60s window). These govern
|
|
; browser/session traffic on general and API endpoints respectively;
|
|
; Bearer-key API traffic is rate-limited separately, per API key.
|
|
RATE_LIMIT_DEFAULT=100
|
|
RATE_LIMIT_API=60
|
|
; Per client IP limits (requests per 60s window), on top of the session ones,
|
|
; so new sessions can't get around them.
|
|
RATE_LIMIT_IP=300
|
|
RATE_LIMIT_IP_API=120
|