承接 jasonmccallister/laravel-preset 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jasonmccallister/laravel-preset

Composer 安装命令:

composer require jasonmccallister/laravel-preset

包简介

Presets for Laravel applications with Docker, PHPCS, PHPUnit, and etc.

README 文档

README

Latest Version on Packagist Total Downloads

This preset will install and prompt you to install Laravel official packages like Horizon and Telescope. This also includes a Makefile for helpful commands for local development and continous integration.

The overall goal is to make it as easy as possible to ship a project with Laravel using Docker, CI/CD, and PHPUnit testing.

Docker

Taking years of experience shipping PHP applications (both Craft CMS and Laravel) with Docker, this is a combination of lessons learned in one package.

Installation

You can install the package via composer:

composer require --dev jasonmccallister/laravel-preset

Usage

php artisan preset jasonmccallister

Follow the prompts on which database to use and what packages to include in the project.

Now all that is left is to run the following command:

make up

Docker

Running the preset command (php artisan preset jasonmccallister) will prompt you on the type of database you are going to use on the project. This will setup the Dockerfile and docker-compose file with the correct database dependencies.

There is a .dockerignore that will exclude the vendor and node_modules from the Docker Build Context. This is included to improve the build times for Docker.

Dockerfile

The goal is to use the same Dockerfile for local development, CI/CD, and deploying a production image. By default only "production" OS packages are installed.

PHP Extensions like xdebug can be installed but are not enabled by default, there is a Makefile command for that!

docker-compose.yaml

To make development with Docker easier locally, we use the docker-compose.yaml to scaffold the creation of the database, queue, and redis instance. Docker Compose makes it really easy to spin all of your services up with one command.

There are a few things of note with this file:

  • The volumes are tagged with :cache to improve Docker's performance with macOS specifically but has no impact on other operating systems
  • There are lines commented out if you are not using Laravel Passport
  • No image is specified for the app and queue containers, this will default to the root folders name. Instead the file will look at the Dockerfile and build the image if it cannot find it locally

Packages

The preset will prompt you to install some recommended first-party packages.

  1. Laravel Dusk
  2. Laravel Horizon
  3. Laravel Telescope
  4. Laravel Scout
  5. Laravel Socialite

Note: if you select to install Horizon, the preset will also prompt you to use the horizon command instead of queue:work. Again this is optional but recommended when using Horizon.

Makefile

The preset will also install a Makefile with a lot of helpful commands. Here is a list of available commands:

  • make build will build an image
  • make composer will install composer dependencies inside of a throw away docker container and copy to your local machine
  • make down will stop, or shutdown, the projects services
  • make horizon will run php artisan horizon:install
  • make logs will show all of your serivces logs with the --follow flag
  • make migrate will run php artisan migrate inside of the docker container
  • make migrate:fresh will run pap artisan migrate inside of the docker container
  • make phpcs will apply .php_cs fixes on the app directory
  • make phpunit runs phpunit inside of the container, useful for CI/CD environments
  • make reports runs phpunit with HTML code coverage inside the container
  • make scale will scale your queue container up to 15 containers. Useful for testing concurrency of background jobs and queues locally
  • make seed runs db:seed inside of your container
  • make ssh will "ssh" you into the app container with a bash shell
  • make ssh-queue the same as the ssh command but will give you a bash shell in the queue container
  • make tag will tag your docker image
  • make tinker runs php artisan tinker inside the app container
  • make telescope will run php artisan telescope:install
  • make testdox runs phpunit with the --testdox flag for prettier output
  • make up is used to start all of your services
  • make xdebug will install the xdebug PHP Extension inside of your app container

Security

If you discover any security related issues, please email themccallister@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

jasonmccallister/laravel-preset 适用场景与选型建议

jasonmccallister/laravel-preset 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 120 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 05 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 jasonmccallister/laravel-preset 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 jasonmccallister/laravel-preset 我们能提供哪些服务?
定制开发 / 二次开发

基于 jasonmccallister/laravel-preset 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 120
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 21
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-09