To use this repo you need to have docker installed in your system.
- Clone or download;
- At root copy
.env.example
to.env
; - Go to
docker-enviroment
directory; - Copy
env-example
to.env
and edit parameterDOCKER_HOST_IP
to your Docker host IP; - Execute
docker-compose build
; - To run docker containers exec
docker-compose up -d
;
Next, it's needed to setup Laravel database:
- Connect to workspace container:
docker exec -it dockerenviroment_workspace_1 bash
; - From inside container run
php artisan migrate && php artisan db:seed
;
To test functionality, run artisan command balance:transfer
with parameters:
--sum=<transfer amount>
--from=<Source User ID>,
--to=<Destination User ID>
For example: php artisan balance:transfer --sum=10 --from=1 --to=2
After completing transfer, appropriate record will appear in the laravel log in storage/logs