eureka / component-deployer
PHP Installer & Deployer for projects based on Eureka Framework
Installs: 331
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- php: 8.1.*||8.2.*||8.3.*
- eureka/component-console: ^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.51.0
- maglnet/composer-require-checker: ^4.7.1
- phpstan/phpstan: ^1.10.60
- phpstan/phpstan-phpunit: ^1.3.16
- phpstan/phpstan-strict-rules: ^1.5.2
- phpunit/phpcov: ^9.0.2
- phpunit/phpunit: ^10.5.13
This package is auto-updated.
Last update: 2024-12-18 18:03:50 UTC
README
PHP Installer & Deployer for projects based on Eureka Framework
Composer
composer require "eureka/component-deployer"
Usage
Symfony config for dependency injections in scripts
parameters: eureka.deployer.dir.src: '/path/to/src' # where the sources will be installed eureka.deployer.dir.www: '/path/to/www' # where the symlink on source will be put (link to use in apache/nginx conf) eureka.deployer.dir.conf: '/path/to/conf' # where the config with prod secrets are stored eureka.deployer.config: # Default values app.name: '%app.name%' app.tag: '%app.version%' app.domain: 'www.%app.name%.com' install: #~ Installation steps step.start: 0 step.end: 100 step.list: #~ 0: Start Install (defined in main installation script) #~ 1 to 9: reserved for deployed itself #~ 1: Install composer #~ 2: Copy secrets files #~ Setup some directories 10: 'Install/Init/Directories' 11: 'Install/Init/Symlink' #~ Yarn / npm 40: 'Install/Yarn/Install' 41: 'Install/Yarn/EncoreBuild' #~ Cleaning installation files 70: 'Install/Clean/Files' #~ Composer cleaning & install no-dev #80: 'Install/Clean/Cache' #~ 90 to 99: reserved for deployed itself #~ 98: Clean cache #~ 99: Init directory again for production #~ 100: Ending installation (defined in main installation script) init: directories: 'var/log': 777 'var/cache': 777 symlinks: '/path/to/upload/': 'web/upload' copy: #~ list of files to copy, with the format "from: to" files: '/path/to/conf/{platform}/{domain}/app.yaml': 'config/secrets/app.yaml' '/path/to/conf/{platform}/{domain}/database.yaml': 'config/secrets/database.yaml' clean: files: - '.gitignore' - 'composer.lock' - 'package.json' - 'README.md' - 'webpack.config.js' - 'yarn.lock' - 'yarn-error.log' directories: - 'assets/' - 'node_modules/' - 'sql/' services: _defaults: autowire: true Eureka\Component\Deployer\: resource: '../../vendor/eureka/component-deployer/src/*' exclude: '../../vendor/eureka/component-deployer/src/{Script}' Eureka\Component\Deployer\Script\: resource: '../../vendor/eureka/component-deployer/src/Script/*' public: true calls: - setPathBuilder: [ '@Eureka\Component\Deployer\Common\PathBuilder'] - setRootDir: [ '%kernel.directory.root%' ] - setConfig: [ '%eureka.deployer.config%' ] Eureka\Component\Deployer\Common\PathBuilder: arguments: $pathSource: '%eureka.deployer.dir.src%' $pathLink: '%eureka.deployer.dir.www%'
Console command (in you application)
~/my-app/$ bin/console deploy --help Use : php Eureka\Component\Deployer\Script\Deploy [OPTION]... OPTIONS: -h, --help Reserved - Display Help -p ARG, --platform=ARG Platform where installation is executed (default: "prod") -t ARG, --tag=ARG Tag version to install (default from config or 1.0.0 if not defined in config) -d ARG, --domain=ARG Application domain (ie: www.my-app.com) (default from config) -n ARG, --name=ARG Application name, used to retrieve config (default from config)
Contributing
See the CONTRIBUTING file.
Install / update project
You can install project with the following command:
make install
And update with the following command:
make update
NB: For the components, the composer.lock
file is not committed.
Testing & CI (Continuous Integration)
Tests
You can run unit tests (with coverage) on your side with following command:
make tests
You can run integration tests (without coverage) on your side with following command:
make integration
For prettier output (but without coverage), you can use the following command:
make testdox # run tests without coverage reports but with prettified output
Code Style
You also can run code style check with following commands:
make phpcs
You also can run code style fixes with following commands:
make phpcsf
Check for missing explicit dependencies
You can check if any explicit dependency is missing with the following command:
make deps
Static Analysis
To perform a static analyze of your code (with phpstan, lvl 9 at default), you can use the following command:
make analyse
To ensure you code still compatible with current supported version at Deezer and futures versions of php, you need to run the following commands (both are required for full support):
Minimal supported version:
make php81compatibility
Maximal supported version:
make php83compatibility
CI Simulation
And the last "helper" commands, you can run before commit and push, is:
make ci
License
This project is currently under The MIT License (MIT). See LICENCE file for more information.