20 lines
1.1 KiB
Markdown
20 lines
1.1 KiB
Markdown
# Demo environment (for README screenshots)
|
|||
|
|
|
||
|
|
Everything here uses **fictional data only**. It spins up a throwaway MariaDB on a private socket and PHP's
|
||
|
|
built-in server, so nothing touches a real database.
|
||
|
|
|
||
|
|
```bash
|
||
|
|
D=$(mktemp -d); cp -r . $D/tinker && cp scripts/demo/router.php scripts/demo/seed.py scripts/demo/capture.py $D/
|
||
|
|
cd $D
|
||
|
|
printf 'DB_HOST=localhost\nDB_USER=root\nDB_PASS=\nDB_NAME=ticketing_system\n' > tinker/.env
|
||
|
|
mariadb-install-db --no-defaults --datadir=$D/db/data --auth-root-authentication-method=normal --skip-test-db
|
||
|
|
mariadbd --no-defaults --datadir=$D/db/data --socket=$D/db/sock --skip-networking --user=root &
|
||
|
|
mariadb --no-defaults -S $D/db/sock -e 'CREATE DATABASE ticketing_system CHARACTER SET utf8mb4'
|
||
|
|
(cd tinker && php -d mysqli.default_socket=$D/db/sock migrations/migrate.php)
|
||
|
|
python3 seed.py && mariadb --no-defaults -S $D/db/sock ticketing_system < seed.sql
|
||
|
|
php -d mysqli.default_socket=$D/db/sock -S 127.0.0.1:8300 -t tinker router.php &
|
||
|
|
python3 capture.py # screenshots + GIF -> docs/img/
|
||
|
|
```
|
||
|
|
|
||
|
|
The app trusts Authelia `Remote-User` headers, so `capture.py` sends them directly. Requires `playwright` and `pillow`.
|