Skip to content

hitman3r44/haveFunMovies-Backend

Repository files navigation

Have Fun Movies

Have Fun Movies is a VOD (Video On demand) application.

Table of Contents

Technology

  • Docker
  • Php-7.2
  • Laravel-5.8
  • Mysql-5.7.22
  • Nginx

Installation

  1. Install docker and docker-compose
  2. Run docker-compose up -d
  3. Run docker ps to see all the running container
  4. To see the logs => http://IP-ADDRESS/admin/logs

Important Command After Installation/Git pull

docker-compose exec app composer install
docker-compose exec app php artisan config:clear
docker-compose exec app php artisan view:clear
docker-compose exec app php artisan migrate:fresh --seed

Docker Commands

If you want, you can run composer or artisan through docker. For instance:

docker-compose exec app composer install
docker-compose exec app php artisan migrate
docker-compose exec app php artisan config:clear
docker-compose exec app php artisan migrate:refresh --seed
docker-compose exec app php artisan migrate:fresh --seed
docker-compose exec app php artisan db:seed
docker-compose exec app php artisan db:seed --class=SeederClassName

Here app is the container/service name, if you want to go inside of any container, run this command:

docker-compose exec app bash

Here is the list of container/service names:

  • app
  • db
  • webserver

Useful Artisan Commands

php artisan migrate
php artisan migrate:refresh --seed

php artisan db:seed
php artisan db:seed --class=SeederClassName

php artisan config:clear
php artisan clear-compiled 
php artisan config:publish

php artisan view:publish
php artisan view:clear

php artisan controller:make ControllerName

php artisan make:controller [MODEL_NAME]Controller --resource --model=[MODEL_NAME]
php artisan make:migration create_[TABLE_NAME]_table

php artisan list
php artisan routes
php artisan down
php artisan up 
php artisan test
php artisan optimize

Useful Docker Commands

docker ps 
docker build -t my_container .
docker run my_image -it bash - Run Bash
docker volume ls  - List of Volumes
docker rm my_container - Removes one or more containers
docker rmi my_image - Removes one or more images
docker stop $(docker ps -a -q)  - stops all running containers
docker kill $(docker ps -q) - kill all running containers
docker rm $(docker ps -a -q) - delete all stopped containers
docker rmi $(docker images -q) - delete all images with 
docker logs -f <CONTAINER> // The -f or --follow option will show live log output

Useful Commands

composer dump-autoload
php artisan iseed my_table // Make Seeder from database table

Server Information

Backend-IP : 159.203.45.240

System Architecture

Detailed information about each service can be found in service folder.

Project Managment

Please go to this youTrack link YouTrack.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.

Important Links