alireza1992 / boozt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Boozt assessment

This is the boozt task for backend position

Overview

  1. Install prerequisites

    Before installing project make sure the following prerequisites have been met: A. docker B. git

  2. Clone the project

    You can download the code from its repository on GitHub.

  3. Install docker on your machine [Optional]

    Another way of running the project would be running

php -S 127.0.0.1:8000 in the 

in the public folder

  1. Run the application

    Please run :

docker-compose up -d
docker-compose logs -f # Follow log output

in the root of the porject

  1. Migration

    You can migrate tables using this command :

cd web/app/Core/Database
docker-compose exec php php app/Core/Database/Migrations.php

This project use the following ports :

Server Port
MySQL 3306
PHPMyAdmin 8010
Nginx 8080
PHP 9000

Project tree

.
|
├── README.md
├── docker-compose.yml
├── docker
│   ├── nginx
│   │   ├── default.conf
│   │   └── default.template.conf
│   ├── php
│   │   └── php.ini
│   ├── mysql
│   │   └── data
│   └── ssl
└── web
    ├── app
    │   ├── Controllers
    │   ├── Core
    │   ├── Migrations
    │   ├── Models
    │   ├── Public
    │   ├── Runtime
    │   ├── Tests
    │   ├── vendor
    │   ├── Views
    │   ├── phpunit.xml.dist

Use Docker commands

Installing package with composer

docker run --rm -v $(pwd)/web/app:/app composer require symfony/yaml

Updating PHP dependencies with composer

docker run --rm -v $(pwd)/web/app:/app composer update

Testing PHP application with PHPUnit

docker-compose exec -T php ./app/vendor/bin/phpunit --colors=always --configuration ./app

Checking installed PHP extensions

docker-compose exec php php -m

Handling database

MySQL shell access

docker exec -it mysqldb bash

Thank you

About


Languages

Language:CSS 48.8%Language:SCSS 46.1%Language:PHP 2.7%Language:JavaScript 1.9%Language:Hack 0.2%Language:Dockerfile 0.1%Language:Shell 0.0%