GuikProd / MarketReminder

Reinventing the inventory and stock management.
0 stars 0 forks source link

MarketReminder

The source code of the web application/API used for MarketReminder mobile application.

Build

SensioLabsInsight Build Status CircleCI Maintainability Codacy Badge Scrutinizer Code Quality

Usage

Once you've installed Docker, time to build the project.

This project use Docker environment files in order to allow the configuration according to your needs, this way, you NEED to define a .env file in order to launch the build.

In order to perform better, Docker can block your dependencies installation and return an error or never change your php configuration, we recommend to delete all your images/containers before building the project

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -a -q) -f

Note that this command can take several minutes before ending

Once this is done, let's build the project.

cp .env.dist .env

Update the information linked to Docker then use Docker-Compose :

make start

Then you must use Composer in order to launch the application :

docker exec -it project_php-fpm sh

# Use Composer inside the container for better performances.
composer install
composer clear-cache
composer dump-autoload --optimize --classmap-authoritative

# Configure BDD
./bin/console d:s:c # for classic users

# Fixtures
./bin/console d:f:l -n

Once this is done, access the project via your browser :

http://localhost:port/

For the production approach, you must update the .env file and change the APP_ENV and APP_DEBUG keys.

http://localhost:port/

If you need to perform some tasks:

make // See the PHP commands

Once in the container:

# Example for clearing the cache
make cache-clear

Please note that you MUST open a second terminal in order to keep git ou other commands line outside of Docker

PHP CLI

cd core
php bin/console s:r || ./bin/console s:r || make serve

Then access the project via your browser:

http://localhost:8000

The commands listed before stay available and needed for this approach

Tests

This project use PHPUnit, Behat and Blackfire in order to test and validate his internal logic, here the listing of available commands for testing purpose:

make phpunit FOLDER=desiredfolder

make phpunit-blackfire FOLDER=desiredfolder

make behat

Contributing

See Contributing