An application to list records in a movement, like Deadlift, Back Squat and Bench Press.
An endpoint to list records in a movement, with raking.
curl --location 'http://0.0.0.0:8020/records?movement=1'
curl --location 'http://0.0.0.0:8020/records?movement=Deadlift'
- PHP 8.4
- MySQL 8.0.32
Clone project in your projects folder.
$ git clone git@github.com:fatorx/app-records.git && cd app-recordsCopy .env.dist to .env and adjust values in the .env file to your preferences.
cp .env.dist .env Add permissions to folder data (MySQL and logs) and api/data (logs), this is where the persistence files will be kept.
chmod 755 data
mkdir api/data/logs
chmod 755 api/data/logsMount the environment based in docker-compose.yml.
docker-compose up -d --buildInstall PHP dependencies
docker exec -it app-records-php php composer.phar installAccess database to create tables (the name "records" is based in the parameter config APP in .env).
docker exec -it app-records mysql -u root -p -D recordsAfter access the docker with above command, at the MySQL prompt type:
source /docker-entrypoint-initdb.d/dump.sqldocker-compose up -ddocker exec -it app-records-php bashAnd then do this
vendor/bin/phpunit --testdox --testsuite "Records Test Suite"docker exec -it app-records-php vendor/bin/phpunit --testdox --testsuite "Records Test Suite"