定制 jamosaur/vali 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

jamosaur/vali

Composer 安装命令:

composer require jamosaur/vali

包简介

Docker for running a Laravel application

README 文档

README

Latest Version on Packagist Software License Total Downloads

An easy way to get started with docker in your laravel installation with local https support. Heavily inspired by Laravel Sail.

Services included:

  • nginx + php8.0-fpm
  • mysql 8
  • redis
  • mailhog

Requirements

  • docker
  • mkcert (if you wish to use https locally)

Install

Via Composer

$ composer require jamosaur/vali
$ php artisan vali:install
$ ./vendor/bin/vali up

The set up wizard will ask you some questions about your requirements. Answer the questions and config will be generated for you.

The first time you run up may take a while as it will have to download docker images, subsequent runs will be much faster.

Adding a bash alias

While not necessary, it is highly recommended to add a bash alias for vali.

By adding an alias, you can invoke vali by vali instead of ./vendor/bin/vali.

To do this, add into your shell config file (~/.zshrc, ~/.bashrc) the following:

alias vali='./vendor/bin/vali'

Using HTTPS

To use https locally, I recommend using mkcert to generate your certificates.

From your project directory, run the following:

vali certificates

vali will ask you for a domain name to use. It will automatically create a wildcard certificate for you.

Entering vali.test will genereate a single certificate that works for vali.test and also *.vali.test

Alternatively, if you'd like to create these manually:

$ mkdir certificates # We will store the certificates in this folder
# For a single domain (e.g. vali.test)
$ mkcert -key-file certificates/server.key -cert-file certificates/server.crt vali.test
# For a wildcard
$ mkcert -key-file certificates/server.key -cert-file certificates/server.crt vali.test \*.vali.test

Usage

If you plan on using https locally, it is best to read through the Using HTTPS section above first.

Get started by running the vali:install artisan command.

php artisan vali:install

This will create a docker-composer.yml file in your project root. It will also create an nginx-config.conf file inside of your config folder. You can make any changes you'd like to your nginx config here.

Available commands

help          Show this output
certificates  Create HTTPS certificates.
up            Start the containers
up -d         Start the containers in the background
down          Stop all of the running containers
build         Build all of the containers
php           Run a PHP command in the container
artisan       Run an artisan command. e.g. vali artisan test
composer      Run composer in the container
migrate       Migrate database
mfs           Refresh the database and seed
test          Run tests via artisan
tinker        Launch a tinker session in the container
shell         Launch a bash session in the container
rootshell     Launch a root bash session in the container

License

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

jamosaur/vali 适用场景与选型建议

jamosaur/vali 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8.36k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2021 年 03 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「docker」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 jamosaur/vali 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 8.36k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-22