Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add environment commands for deployment #13

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
88bb5b9
Update README.md
gplanchat Aug 5, 2020
60a3705
Update README.md
gplanchat Aug 5, 2020
9200f7d
Added Dejavu enable/disable switch
gplanchat Sep 11, 2020
a075f5c
update doc
sylvainraye Sep 21, 2020
2841eb3
Merge pull request #11 from diglin/master
gplanchat Sep 23, 2020
762af97
#12 : add environment:init
nicolas43000 Sep 23, 2020
3bb55d9
#12 : refacto
nicolas43000 Sep 24, 2020
4afd180
#12 : big commit adding DTO, some refacto, get and list command
nicolas43000 Sep 30, 2020
de6bd0a
Merge remote-tracking branch 'origin/master' into feature/12-add-envi…
nicolas43000 Sep 30, 2020
5c58d79
#12 : refacto
nicolas43000 Sep 30, 2020
2e5bdf5
#12 : Add Set & Unset commands + changed PHP requirements + small cs …
nicolas43000 Oct 2, 2020
3174ade
#12 : fix
nicolas43000 Oct 2, 2020
890f79b
#12 : Add deploy, destroy and rsync commands
nicolas43000 Oct 6, 2020
ae22456
#12 : Add cache clear, start and stop commands
nicolas43000 Oct 6, 2020
8f6e466
Merge remote-tracking branch 'origin/master' into feature/12-add-envi…
nicolas43000 Oct 6, 2020
a7100cb
Merge remote-tracking branch 'origin/master' into feature/12-add-envi…
nicolas43000 Nov 17, 2020
a7ba45a
#12 : Run `composer update nothing` after merge
nicolas43000 Nov 17, 2020
8d73483
#12 : fix yaml indent and default dbms to null
nicolas43000 Nov 20, 2020
f4bc6e2
#12 : Add database:dump and variable:add commands
nicolas43000 Nov 20, 2020
3b874f2
#12 : Remove useless code
nicolas43000 Nov 20, 2020
e70ba8b
#12 : Add database:load cmd and timeout(0) to database:dump cmd
nicolas43000 Nov 20, 2020
4bc7a60
#12 : Add shell cmd
nicolas43000 Nov 20, 2020
f1db046
#12 : Add doc to README.md
nicolas43000 Nov 20, 2020
5852e9f
Merge branch 'master' into feature/12-add-environment-commands
gplanchat Nov 25, 2020
5fc566c
Updated retrieved lost docs about environment commands
gplanchat Nov 25, 2020
4c1e9d9
#12 : Add proxy command for port forwarding
nicolas43000 Dec 10, 2020
eee91d7
Merge branch 'feature/12-add-environment-commands' of github.com:kibo…
nicolas43000 Dec 10, 2020
71b9ace
Merge branch 'master' into feature/12-add-environment-commands
gplanchat Dec 14, 2020
1684b03
Remove typo
sebprt Dec 22, 2020
c556e8a
Fix dump and load commands : Create Normalizer and a second Finder in…
sebprt Dec 22, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This project aims at building your Docker stack for [OroCommerce](https://oroinc

> ⚠️ Nota: Those stacks are not suited for production hosting, but to provide an environment based on Docker as identical as possible to OroCloud on a personal computer.

* [Requirements](#requirements)
* [Installation](#installation)
* [Usage](#usage)
* [Frequently Asked Questions](#frequently-asked-questions)
Expand All @@ -15,6 +16,11 @@ This project aims at building your Docker stack for [OroCommerce](https://oroinc
* [Marello](#marello)
* [Middleware](#middleware)

Requirements:
---
- PHP 7.4
- rsync (for environment commands)

Installation
---

Expand Down
57 changes: 54 additions & 3 deletions bin/kloud
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env php
<?php

if (version_compare(PHP_VERSION, '5.4.0') < 0) {
throw new RuntimeException('This command requires a minimum version 5.4 for PHP. Please upgrade your PHP version or use the pre-packaged Docker image variant. See https://github.com/kiboko-labs/docker-images/#if-you-want-to-use-the-pre-packaged-docker-image');
if (version_compare(PHP_VERSION, '7.4.0') < 0) {
throw new RuntimeException('This command requires a minimum version 7.4 for PHP. Please upgrade your PHP version or use the pre-packaged Docker image variant. See https://github.com/kiboko-labs/docker-images/#if-you-want-to-use-the-pre-packaged-docker-image');
}

require __DIR__ . '/../vendor/autoload.php';
Expand Down Expand Up @@ -59,6 +59,57 @@ $app->addCommands([
__DIR__ . '/../config/',
__DIR__ . '/../compose/',
))->setAliases(['upgrade']),

(new Command\Environment\InitCommand(
Command\Environment\InitCommand::$defaultName,
)),

(new Command\Environment\Variable\ListCommand(
Command\Environment\Variable\ListCommand::$defaultName,
)),

(new Command\Environment\Variable\GetCommand(
Command\Environment\Variable\GetCommand::$defaultName,
)),

(new Command\Environment\Variable\SetCommand(
Command\Environment\Variable\SetCommand::$defaultName,
)),

(new Command\Environment\Variable\UnsetCommand(
Command\Environment\Variable\UnsetCommand::$defaultName,
)),

(new Command\Environment\DeployCommand(
Command\Environment\DeployCommand::$defaultName,
$app,
)),

(new Command\Environment\DestroyCommand(
Command\Environment\DestroyCommand::$defaultName,
$app,
)),

(new Command\Environment\StartCommand(
Command\Environment\StartCommand::$defaultName,
$app,
)),


(new Command\Environment\StopCommand(
Command\Environment\StopCommand::$defaultName,
$app,
)),

(new Command\Environment\RsyncCommand(
Command\Environment\RsyncCommand::$defaultName,
$app,
)),

(new Command\Environment\Cache\ClearCommand(
Command\Environment\Cache\ClearCommand::$defaultName,
$app,
)),
]);

$app->run(new ArgvInput($argv), new ConsoleOutput());
$app->run(new ArgvInput($argv), new ConsoleOutput());
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"symfony/property-access": "^5.0",
"symfony/serializer": "^5.0",
"symfony/yaml": "^5.0",
"splitbrain/php-archive": "^1.1"
"splitbrain/php-archive": "^1.1",
"deployer/deployer": "^6.8"
},
"require-dev": {
"friends-of-phpspec/phpspec-code-coverage": "^4.0",
Expand Down
Loading