clntdev/servd
Composer 安装命令:
composer create-project clntdev/servd
包简介
Docker PHP Development Environment
README 文档
README
ServD is a Docker PHP development environment heavily inspired by Laravel Valet and Laradock, it supports multiple projects within a working directory and primarily runs on [Alpine Linux](https://alpinelinux.org/).In its current form, it installs the majority of PHP Extensions available, including xdebug which currently adds slower performance than expected. This will change and these extensions will be able to be toggled in a future release.
It offers PHP, Node.js, Database Software, Elasticsearch and PHP Composer version selection making it easy to change the environment to suit your needs.
Installation
Install via composer globally by running composer global require clntdev/servd - once this has finished type servd into the CLI and ensure it returns a list of commands.
- Run the
servd installcommand to setup required services and generate the.servdfolder which will be located within the user home directory. - Run the
servd startcommand after completing the installation steps, this will pull/build images and then start up the configured services.
Commands
List of commands:
servd install
- Creates sqlite database
- Prompt for preferred options such as PHP version/Node Version and Composer Version
- Prompt for confirmation of working directory, choose current directory or full path can be specified
servd set:timezone
- Set the timezone to be used by PHP and the core docker container
- This must be a valid IANA Timezone such as Europe/London, America/New_York etc
- The default timezone is UTC
servd start
- Start docker containers
servd stop
- Stop docker containers
servd restart
- Restart docker containers
- Rebuild docker images with optional
--rebuildflag
servd rebuild
- Rebuild docker containers
- Update images with optional
--updateflag - Rebuild/Update a specific container by specifying name as an argument:
servd rebuild mysql
servd configure
- Regenerates configuration files and directory structures
servd use x.x
- Stops containers
- Switch PHP version to specified (7.4, 8.0, 8.1 supported)
- Rebuilds configuration and docker containers
- Starts docker containers
servd secure
- Generates certificates and configures the current project for HTTPS, rebuilding config files and restarting services
- Note: You will need to ensure the created
servdCA.crtCA is trusted by your machine
servd unsecure
- Removes existing certificate files for a project and marks it as non secure, rebuilding config files and restarting services
servd secure:trust
- macOS (requires sudo) - this command will attempt to add the CA certificate generated to the system
- Linux & Windows Users - you will need to manually add the
servdCA.crtcertificate authority file to your computer's certificate store
Note for Firefox users: You may need to trust the
servdCA.crtfile manually by importing it into Firefox's own certificate store (if site is secure in OS browser but not in Firefox then this is likely the reason why)
servd park
- Adds/Changes the project directory to the current directory
servd run "{command}"
- Run given command in docker container using current directory name as project directory name, remember to wrap command in quotes if more than one word i.e.
servd run "php artisan cache:clear"
servd cli {container(optional)}
- Open an interactive shell into the given container or the
servd_corecontainer by default if none specified
Supported Drivers
- Laravel
- Wordpress
- Drupal
- GenericHtml (basic config)
- GenericPhp (basic config with php-fpm)
Other
Built with Laravel Zero
clntdev/servd 适用场景与选型建议
clntdev/servd 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 52 次下载、GitHub Stars 达 2, 最近一次更新时间为 2022 年 03 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cli」 「console」 「docker」 「valet」 「servd」 「localdev」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 clntdev/servd 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 clntdev/servd 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 clntdev/servd 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This class provides you with an easy-to-use interface to progress bars.
A Laravel package to retrieve data from Google Search Console
Additional artisan commands for Laravel
Docker based testing environment for shopware projects.
The Laragoon utility package
Docker compose for Robo Task Runner
统计信息
- 总下载量: 52
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-24