Code Monkey home page Code Monkey logo

projectun's Introduction

Projet Un

Build

  • Insight :

  • Blackfire :

Docker 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 recommand 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 informations linked to Docker then use Docker-Compose :

docker-composer up -d --build

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 --no-dev

# 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 :

  • Dev :
http://localhost:port/

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

  • Prod :
http://localhost:port/

If you need to perform some tasks:

docker exec -it project_php-fpm sh

Once in the container:

# Example for clearing the cache
./bin/console c:c --env=prod || rm -rf var/cache/*

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 coverage

This project is completely tested and followed by PHPUnit and Behat, this way, our code is easily maintainable and upgradable, here's is the details of the coverage :

In order to launch the tests, here's the process :

Be sure to have build the containers/services

docker exec -it project_php-fpm sh
  • PHPUnit
phpunit -v
  • Behat
vendor/bin/behat

Once this is done, you should see the different results of tests.

projectun's People

Contributors

emilienletestu avatar guikingone avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.