{"id":18745633,"url":"https://github.com/yazeedobaid/my-laravel-setup","last_synced_at":"2026-04-11T03:04:02.523Z","repository":{"id":98533021,"uuid":"207166288","full_name":"yazeedobaid/my-laravel-setup","owner":"yazeedobaid","description":"My Laravel Project setup","archived":false,"fork":false,"pushed_at":"2020-01-19T11:05:28.000Z","size":703,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-28T20:25:42.893Z","etag":null,"topics":["eslint","jest","laravel","laravel-setup","postcss","tailwindcss","vue"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yazeedobaid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-08T19:58:54.000Z","updated_at":"2020-01-19T11:05:30.000Z","dependencies_parsed_at":"2023-04-20T12:48:45.239Z","dependency_job_id":null,"html_url":"https://github.com/yazeedobaid/my-laravel-setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazeedobaid%2Fmy-laravel-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazeedobaid%2Fmy-laravel-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazeedobaid%2Fmy-laravel-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazeedobaid%2Fmy-laravel-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yazeedobaid","download_url":"https://codeload.github.com/yazeedobaid/my-laravel-setup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239627233,"owners_count":19670844,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eslint","jest","laravel","laravel-setup","postcss","tailwindcss","vue"],"created_at":"2024-11-07T16:18:56.926Z","updated_at":"2025-11-23T12:30:19.461Z","avatar_url":"https://github.com/yazeedobaid.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# my-laravel-setup\nMy Laravel Project initial setup. This repository contains my preferred setup of a Laravel project with the preferred packages to work on.\n\n## Included Dependancies\n* Laravel UI with Vue and Auth Scaffolding\n* Font magician postcss plugin\n* Tailwindcss\n* Autoprefixer postcss plugin\n* Purgecss postcss plugin\n* Laravel mix postcss config plugin\n* Jest\n* Eslint\n\n## Setup\nFirst, clone this repository or download it. Then\n\nInstall Composer dependencies using:\n```\n$ composer install\n```\n\nInstall NPM dependencies using:\n```\n$ npm install\n```\n\n#### Development\nServing application to a local server:\n```\n$ php artisan serve\n```\n\nWatch assets files for changes:\n```\n$ npm run watch\n```\n\nWatch assets files with browser hot reload for changes:\n```\n$ npm run hot\n```\n\n#### Production\nBuild assets for production:\n```\n$ npm run prod\n```\n\n#### Linting\nThe linting uses Javascript standard plugin along with ESLint Vue and Jest plugins. To linting Javascript and Vue components:\n```\n$ npm run lint\n```\n\nFixing linting problems:\n```\n$ npm run lint:fix\n```\n\n## Docker\nThe ```docker``` directory at the root of the project contains all Docker files and scripts\nto start using Docker with the application. The Docker setup depends on these official Docker images.\n* ubuntu:18.04\n* mysql:5.7\n* redis:5.0.7\n* node:13.2.0-alpine3.10\n\nThe compose file build two images; The **app** image and **node** image. The app image is the main image for the application which\ncontains Nginx, PHP-FPM and Supervisor. The node image is used for front-end development. The two images are scoped\nunder repository name **laravelapp**.\n\n### Docker compose\nA ```docker-compose.yml``` file has been added to build and run containers from one command.\n```\n$ docker-compose up\n```\n\nThe ```docker-compose.yml``` file take environment variables from the ```.env``` file and use it in building and running \nthe services of the application.\n\n#### Development with compose:\nTo running commands against docker-compose containers the ```docker-run``` script can be used. The script\ntranslate the arguments given to it and execute them in the correct container. The following table shows usage examples:\n\n| Command                     | Container   | Example                           |\n|-----------------------------|-------------|-----------------------------------|\n| ./docker-run composer ...   | app         | `./docker-run composer dump -o`   |\n| ./docker-run artisan ...    | app         | `./docker-run artisan migrate`    |\n| ./docker-run redis ...      | redis       | `./docker-run redis set foo bar`  |\n| ./docker-run mysql ...      | mysql       | `./docker-run mysql -u root -p`   |\n| ./docker-run npm ...        | node        | `./docker-run npm run watch`      |\n| ./docker-run ...            | app         | `./docker-run ls`                 |\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003eAll services of docker compose redirect their logs to the STDOUT and STDERR, so when running ```docker-compose up```\n\u003ethe logs will be redirected to terminal.\n\n### Docker Swarm\nA compose file is included in the ```docker``` directory to be deploy application to a swarm cluster. The compose file define a stack for the application. The stack has a **web**, **mysql** and **redis** services. The web service uses an image that will contain the application code ready for production use. This service runs in replica mode with 3 replicas. The mysql and redis services run using DNSRR (DNS Round-Robin) entry point mode with single replica on a manager node. DNS Round-Robin mode is used since these services has single task, hence no need for virtual network in front of these two services. The compose file has environment variables, like credentials. That need to be replaced with application specific ones.\n\nTo deploy to swarm. First initialize a swarm and join other nodes to the cluster. Then edit the stack compose file ```docker-stack.yml``` in ```docker``` directory and substitute the environment variables with your own ones. Then execute the following command on a manager node;\n```\n$ docker stack deploy -c docker/docker-stack.yml\n```\n\u003eThe web service is expected to contain the application code ready for production use.\n\n### Data persistence:\nThe database data and redis cache data are mounted to Docker named volumes in the two (development and production environments) compose files.\n\n### Caveats\n* A .env file must be created as usual in the root directory of the project. Docker compose use that file in\nbuilding the services containers.\n* For MYSQL, to use the root user remove the **MYSQL_USER** and **MYSQL_PASSWORD** environment variables from mysql service in\ndocker-compose file.\n* Changing MYSQL credentials in docker-compose for .env file will not take effect in an already created database (check MYSQL docs in hub.docker)\n* When deploying to production using Docker stack, edit the docker/docker-stack.yml file and replace the environment variables in the file with your own.\n* Change the owner of application files to Nginx process to avoid permission issues when Laravel change files in application using Nginx process.\n```$ chown -R www-data: html/```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyazeedobaid%2Fmy-laravel-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyazeedobaid%2Fmy-laravel-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyazeedobaid%2Fmy-laravel-setup/lists"}