clntdev/servd

Docker PHP Development Environment

Maintainers

Details

github.com/clnt/servd

Source

Issues

Installs: 41

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

Type:project

1.0.9 2022-07-14 19:53 UTC

This package is auto-updated.

Last update: 2022-09-14 20:15:09 UTC


README

Stable Build CI Status Code Coverage

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 install command to setup required services and generate the .servd folder which will be located within the user home directory.
  • Run the servd start command 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 --rebuild flag

servd rebuild

  • Rebuild docker containers
  • Update images with optional --update flag
  • 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.crt CA 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.crt certificate authority file to your computer's certificate store

Note for Firefox users: You may need to trust the servdCA.crt file 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_core container by default if none specified

Supported Drivers

  • Laravel
  • Wordpress
  • Drupal
  • GenericHtml (basic config)
  • GenericPhp (basic config with php-fpm)

Other

Built with Laravel Zero