/bankAccountApi

Demo Lumen app simulating a bank account api

Primary LanguagePHP

Bank account API

Sample Lumen application running on Docker services.

Docker containers are based on Alpine Linux images which makes them smaller, more secure and more resource efficient.

The application implements an API to simulate the functionality of a basic bank account.

Requirementes

You will need to install Git, Docker and Docker Compose.

Set up

Clone this repository

git clone https://github.com/Stolz/bankAccountApi.git && cd bankAccountApi

Create configuration file for current environment

cp lumen/.env.example lumen/.env

Install Lumen dependencies

docker run --rm -it -v $PWD/lumen:/lumen -u $(id -u):$(id -g) composer install --ignore-platform-reqs --no-dev --working-dir=/lumen

Build images

docker-compose build

Start containers

docker-compose up

Debugging

These two files have been included only for debugging purposes and they should be deleted for production environment:

Testing

Install Lumen testing dependencies

docker run --rm -it -v $PWD/lumen:/lumen -u $(id -u):$(id -g) composer install --ignore-platform-reqs --working-dir=/lumen

Execute automatic tests

docker exec -it bankaccountapi_app_1 ./vendor/bin/phpunit

A Postman collection for manual testing can be found at lumen/Postman_collection.json file.