majidakbari / takeaway

Sample project (Usage of files rather than database)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample laravel project

This project includes a docker container based on php-apache image.

It is under development, So the source code is mounted from the host to the container. On the production environment you should remove these volumes.

Installation guide

Follow these steps to simply run the project.

Clone the project

Clone this repository to your local machine using the following command

git clone git@github.com:majidakbari/takeaway.git

Environment variables

Setting up the container (OS) level environment variables like $USER id WWW_DATA_USER_ID. So every single file which is created or modified by container users will be owned by $USER because of user id mapping between the host and the containers.

cd /path-to-project
cp .env.example .env
vim .env

Running the containers

On the terminal and type the following command:

docker-compose up -d 

Bootup the application

Only the first time that you want to run the application, you need to execute the following command. It will install the dependencies, creates .env laravel file, generates the application key and changes required directory permissions.

docker-compose exec --user www-data app bootup

API Documentation

In the root of the project there is a postman collection which contains the API doc. Also you can find the API documentation on the following address.

API Documentation

Tests

To run tests, in the terminal type the following command:

docker-compose exec app vendor/bin/phpunit

Images/Containers

app php:7.3.5-apache

Licence

License: MIT

About

Sample project (Usage of files rather than database)


Languages

Language:PHP 91.9%Language:Vue 5.6%Language:Dockerfile 1.1%Language:HTML 0.9%Language:Shell 0.5%