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

Magento2: allow non-zero-downtime deployment #2941

Merged
merged 3 commits into from
Mar 3, 2022

Conversation

lfolco
Copy link
Contributor

@lfolco lfolco commented Feb 2, 2022

Hoping this can make it into the main repo, this addresses #2936, allowing users to disable zero-downtime deployment. The flag defaults to allowing it; users would have to set it in their own deploy.php file, and then be required to enable/disable maintenance mode on their own.

This also adds .maintenance.flag to the shared files array.

  • Bug fix #…?

  • New feature?

  • BC breaks?

  • Tests added?

  • Docs added?

    Please, regenerate docs by running next command:
    $ php bin/docgen
    

# Conflicts:
#	docs/recipe/magento2.md
#	recipe/magento2.php
@antonmedv antonmedv merged commit 5550911 into deployphp:master Mar 3, 2022
antonmedv added a commit that referenced this pull request Mar 3, 2022
* Update magento2.php

Added var/.maintenance.flag as a shared file, closes issue #2940

* [automatic] Update docs with bin/docgen

* zsh completion syntax fix (#2947)

* Update doc provision as root (#2952)

* Provision: add alternative to using a root user
(docs and warning)

* Update docs

* Adding PATCH to Httpie (#2950)

* Fix `host` examples (#2961)

* Cleanup code (#2974)

* Task: added phpdocs

* Update Task.php

* add callable phpdocs

* remove useless bool-return

* remove useless return

* remove useless return

* run bin/docgen

* Add dependabot (#2926)

* Make sure to use the correct PHP binary with existing Composer (#2967)

* Make sure to use the correct PHP binary with existing Composer

* Typo

* Typo again

* Fix php-fpm recipe: use bin/php and add statement terminator (#2956)

* Magento2: allow non-zero-downtime deployment (#2941)

* Magento2: allow non-zero-downtime deployment; add `.maintenance.flag` to shared files

* ran docgen

* Add an option to deploy only a sub-folder of the repository (#2821)

* add new sub_directory option

* update docs

* Update docs/recipe/deploy/update_code.md

Co-authored-by: Mario Ramundo <ramundomario@gmail.com>

Co-authored-by: Mario Ramundo <ramundomario@gmail.com>
Co-authored-by: Anton Medvedev <anton@medv.io>

* [automatic] Update docs with bin/docgen

* Add more dirs into Symfony to writable dirs

Added: 'var/cache', 'var/log', 'var/sessions'

* [automatic] Update docs with bin/docgen

* Fix replacing tasks (#2879)

fixes #2878

* Contao recipe (#2851)

* Add Contao recipe

* Fix command argument

* Enable maintenance mode in both the current and release build

* Add the contao:manager:lock task

* Use correct public path in shared_dirs

* Make sure that the directory exists

* Fix ssh command to work on Windows (#2920)

* Don't copy node_modules because it will get deleted (#2919)

* check func_num_args() in get() (#2951)

Co-authored-by: Peter Jaap Blaakmeer <peterjaap@blaakmeer.com>
Co-authored-by: peterjaap <peterjaap@users.noreply.github.com>
Co-authored-by: Mariusz Fik <33876+Fisiu@users.noreply.github.com>
Co-authored-by: David Palomares <underdpt@users.noreply.github.com>
Co-authored-by: CaptainFalcon92 <24324122+CaptainFalcon92@users.noreply.github.com>
Co-authored-by: Gennadiy Sevalnev <sevgen6613@mail.ru>
Co-authored-by: Markus Staab <47448731+clxmstaab@users.noreply.github.com>
Co-authored-by: Benoît Chantre <mail@benoitchantre.com>
Co-authored-by: Yanick Witschi <yanick.witschi@terminal42.ch>
Co-authored-by: refs <marcel@refs.media>
Co-authored-by: Laura Folco <me@laurafolco.com>
Co-authored-by: matsn0w <bartscholtus@gmail.com>
Co-authored-by: Mario Ramundo <ramundomario@gmail.com>
Co-authored-by: antonmedv <antonmedv@users.noreply.github.com>
Co-authored-by: Dr. Ulrich Thomas Gabor <ulrich.thomas.gabor@odd-solutions.de>
Co-authored-by: Richard Henkenjohann <richardhenkenjohann@googlemail.com>
Co-authored-by: Yoann Chocteau <Yoann-TYT@users.noreply.github.com>
antonmedv added a commit that referenced this pull request Mar 15, 2022
* Update magento2.php

Added var/.maintenance.flag as a shared file, closes issue #2940

* [automatic] Update docs with bin/docgen

* zsh completion syntax fix (#2947)

* Update doc provision as root (#2952)

* Provision: add alternative to using a root user
(docs and warning)

* Update docs

* Adding PATCH to Httpie (#2950)

* Fix `host` examples (#2961)

* Cleanup code (#2974)

* Task: added phpdocs

* Update Task.php

* add callable phpdocs

* remove useless bool-return

* remove useless return

* remove useless return

* run bin/docgen

* Add dependabot (#2926)

* Make sure to use the correct PHP binary with existing Composer (#2967)

* Make sure to use the correct PHP binary with existing Composer

* Typo

* Typo again

* Fix php-fpm recipe: use bin/php and add statement terminator (#2956)

* Magento2: allow non-zero-downtime deployment (#2941)

* Magento2: allow non-zero-downtime deployment; add `.maintenance.flag` to shared files

* ran docgen

* Add an option to deploy only a sub-folder of the repository (#2821)

* add new sub_directory option

* update docs

* Update docs/recipe/deploy/update_code.md

Co-authored-by: Mario Ramundo <ramundomario@gmail.com>

Co-authored-by: Mario Ramundo <ramundomario@gmail.com>
Co-authored-by: Anton Medvedev <anton@medv.io>

* [automatic] Update docs with bin/docgen

* Add more dirs into Symfony to writable dirs

Added: 'var/cache', 'var/log', 'var/sessions'

* [automatic] Update docs with bin/docgen

* Fix replacing tasks (#2879)

fixes #2878

* Contao recipe (#2851)

* Add Contao recipe

* Fix command argument

* Enable maintenance mode in both the current and release build

* Add the contao:manager:lock task

* Use correct public path in shared_dirs

* Make sure that the directory exists

* Fix ssh command to work on Windows (#2920)

* Don't copy node_modules because it will get deleted (#2919)

* check func_num_args() in get() (#2951)

* Bump symfony/process from 5.4.2 to 5.4.5 (#2993)

Bumps [symfony/process](https://github.com/symfony/process) from 5.4.2 to 5.4.5.
- [Release notes](https://github.com/symfony/process/releases)
- [Changelog](https://github.com/symfony/process/blob/5.4/CHANGELOG.md)
- [Commits](symfony/process@v5.4.2...v5.4.5)

---
updated-dependencies:
- dependency-name: symfony/process
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump phpunit/php-code-coverage from 9.2.10 to 9.2.14 (#2992)

Bumps [phpunit/php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage) from 9.2.10 to 9.2.14.
- [Release notes](https://github.com/sebastianbergmann/php-code-coverage/releases)
- [Changelog](https://github.com/sebastianbergmann/php-code-coverage/blob/master/ChangeLog.md)
- [Commits](sebastianbergmann/php-code-coverage@9.2.10...9.2.14)

---
updated-dependencies:
- dependency-name: phpunit/php-code-coverage
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump symfony/console from 5.4.2 to 5.4.5 (#2991)

Bumps [symfony/console](https://github.com/symfony/console) from 5.4.2 to 5.4.5.
- [Release notes](https://github.com/symfony/console/releases)
- [Changelog](https://github.com/symfony/console/blob/5.4/CHANGELOG.md)
- [Commits](symfony/console@v5.4.2...v5.4.5)

---
updated-dependencies:
- dependency-name: symfony/console
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump react/http from 1.5.0 to 1.6.0 (#2989)

Bumps [react/http](https://github.com/reactphp/http) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/reactphp/http/releases)
- [Changelog](https://github.com/reactphp/http/blob/master/CHANGELOG.md)
- [Commits](reactphp/http@v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: react/http
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update info.php

* Revert "check func_num_args() in get() (#2951)" (#2995)

This reverts commit 5a1fdf8.

* Fix phpstan issues (#3001)

* Bump phpstan version to support php 8.1

* Fix some minor issues reported by phpstan

* Invert the elseif condition to check the most specific first

Co-authored-by: Mathieu Imbert <mathieu.imbert@tracktik.com>

* Bump symfony/yaml from 5.4.2 to 5.4.3 (#3003)

Bumps [symfony/yaml](https://github.com/symfony/yaml) from 5.4.2 to 5.4.3.
- [Release notes](https://github.com/symfony/yaml/releases)
- [Changelog](https://github.com/symfony/yaml/blob/5.4/CHANGELOG.md)
- [Commits](symfony/yaml@v5.4.2...v5.4.3)

---
updated-dependencies:
- dependency-name: symfony/yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump phpunit/php-code-coverage from 9.2.14 to 9.2.15 (#3005)

Bumps [phpunit/php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage) from 9.2.14 to 9.2.15.
- [Release notes](https://github.com/sebastianbergmann/php-code-coverage/releases)
- [Changelog](https://github.com/sebastianbergmann/php-code-coverage/blob/master/ChangeLog.md)
- [Commits](sebastianbergmann/php-code-coverage@9.2.14...9.2.15)

---
updated-dependencies:
- dependency-name: phpunit/php-code-coverage
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump phpunit/phpunit from 9.5.11 to 9.5.17 (#3006)

Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.11 to 9.5.17.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md)
- [Commits](sebastianbergmann/phpunit@9.5.11...9.5.17)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump symfony/polyfill-php80 from 1.24.0 to 1.25.0 (#3007)

Bumps [symfony/polyfill-php80](https://github.com/symfony/polyfill-php80) from 1.24.0 to 1.25.0.
- [Release notes](https://github.com/symfony/polyfill-php80/releases)
- [Commits](symfony/polyfill-php80@v1.24.0...v1.25.0)

---
updated-dependencies:
- dependency-name: symfony/polyfill-php80
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Make the Importer class extendable (#3010)

* Make the importer extendable

* Fix the existing unit tests

* Add the unit test

* Update config.yml

* Update config.yml

* Update config.yml

* Update bug_report.md

* Update feature_request.md

* Remove config.md

* Site-enabled folder for Caddy configs (#2949)

* Site-enabled folder for Caddy configs

* Caddyfile from project path

* Remove debug code

* always reload caddy

* fix a doc

* Remove absolute file paths from theme-config using the deploy_path (#2801)

* Remove absolute file paths from theme-config using the deploy_path

* Updated docs

* Update regex

* Fix regex

* Update shopware.php

Updated regex to allow release names with alphanumeric characters

Co-authored-by: Anton Medvedev <anton@medv.io>

* [automatic] Update docs with bin/docgen

* Append Caddyfile instead of overriding it

* Enforce proper types from yaml recipes

* Allow master server to perform large requests

* Fix phpcs update (#3032)

* Bump slevomat/coding-standard from 6.4.1 to 7.0.19

Bumps [slevomat/coding-standard](https://github.com/slevomat/coding-standard) from 6.4.1 to 7.0.19.
- [Release notes](https://github.com/slevomat/coding-standard/releases)
- [Commits](slevomat/coding-standard@6.4.1...7.0.19)

---
updated-dependencies:
- dependency-name: slevomat/coding-standard
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* style: fix all errors reported by phpcs

* style: remove typehints incompatible with php 7

* chore: update phpcs config

* chore: add missing docblocks

* style: remove useless ignore statements

* fix: remove extra mixed typehints

* fix: update api.md

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mathieu Imbert <mathieu.imbert@tracktik.com>

* Fix code style

* Limit release_log to 300

* Separate legacy and joy tests

* Fixes #2968

Add default host config values

* Add artisan event:cache to Laravel deployment task (#3035)

This does not appear to harm Laravel apps with event discovery disabled but will speed up applications that do use it

* [automatic] Update docs with bin/docgen

* Bump phpstan/phpstan from 1.4.8 to 1.4.10 (#3039)

Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.4.8 to 1.4.10.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.5.x/CHANGELOG.md)
- [Commits](phpstan/phpstan@1.4.8...1.4.10)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump pestphp/pest from 1.21.1 to 1.21.2 (#3040)

Bumps [pestphp/pest](https://github.com/pestphp/pest) from 1.21.1 to 1.21.2.
- [Release notes](https://github.com/pestphp/pest/releases)
- [Changelog](https://github.com/pestphp/pest/blob/v1.21.2/CHANGELOG.md)
- [Commits](pestphp/pest@v1.21.1...v1.21.2)

---
updated-dependencies:
- dependency-name: pestphp/pest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump phpunit/phpunit from 9.5.17 to 9.5.18 (#3041)

Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.17 to 9.5.18.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md)
- [Commits](sebastianbergmann/phpunit@9.5.17...9.5.18)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update dependabot.yml

* Trigger test workflow for v8 branch.

Co-authored-by: Peter Jaap Blaakmeer <peterjaap@blaakmeer.com>
Co-authored-by: peterjaap <peterjaap@users.noreply.github.com>
Co-authored-by: Mariusz Fik <33876+Fisiu@users.noreply.github.com>
Co-authored-by: David Palomares <underdpt@users.noreply.github.com>
Co-authored-by: CaptainFalcon92 <24324122+CaptainFalcon92@users.noreply.github.com>
Co-authored-by: Gennadiy Sevalnev <sevgen6613@mail.ru>
Co-authored-by: Markus Staab <47448731+clxmstaab@users.noreply.github.com>
Co-authored-by: Benoît Chantre <mail@benoitchantre.com>
Co-authored-by: Yanick Witschi <yanick.witschi@terminal42.ch>
Co-authored-by: refs <marcel@refs.media>
Co-authored-by: Laura Folco <me@laurafolco.com>
Co-authored-by: matsn0w <bartscholtus@gmail.com>
Co-authored-by: Mario Ramundo <ramundomario@gmail.com>
Co-authored-by: Anton Medvedev <anton@medv.io>
Co-authored-by: antonmedv <antonmedv@users.noreply.github.com>
Co-authored-by: Dr. Ulrich Thomas Gabor <ulrich.thomas.gabor@odd-solutions.de>
Co-authored-by: Richard Henkenjohann <richardhenkenjohann@googlemail.com>
Co-authored-by: Yoann Chocteau <Yoann-TYT@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mathieu I <mathieu.imbert@gmail.com>
Co-authored-by: Mathieu Imbert <mathieu.imbert@tracktik.com>
Co-authored-by: Kamil Kuzminski <kamil.kuzminski@codefog.pl>
Co-authored-by: Sergei Sergeev <info@asamat.com>
Co-authored-by: chrisan <3704774+chrisan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants