693 Commits

Author SHA1 Message Date
Anton Medvedev
ed626d4b19 Add exception to accessing previous_release outside of release. 2022-09-10 09:10:09 +02:00
Michał Giza
6981405647
Magento2: add var/page_cache as writable_dirs (#3202)
* var/page_cache as writable_dirs

It will fix following Zend exception after successful deployment:
Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/path/to/www/releases/7/var/page_cache" is not writable in /path/to/www/releases/7/vendor/magento/zendframework1/library/Zend/Cache.php:209
This exception does not occur on every environment, it depends on PHP pool user/group (default www-data or owner of project directory).

* docgen
2022-08-28 18:49:05 +02:00
Rigel Kent Carbonel
f51f0e3c03
Add octane tasks in laravel recipe (#3076)
* Add octane tasks in laravel recipe

* Update docs
2022-08-28 18:47:35 +02:00
kishan nath
497054ddc1
changed python to python-is-python3 in package list (#3233) 2022-08-28 18:45:45 +02:00
Michał Giza
6ca236a706
Fix Caddy install (#3274) 2022-08-28 18:38:37 +02:00
Michał Giza
b92b1c6dd3
Pimcore recipe fixes (#3212)
* Share Pimcore database configuration

* writeable var/cache/dev
2022-07-23 15:45:59 +02:00
ameotoko
b6fd811edb
fix definition of {{bin/php}} parameter in Contao recipe (#3200) 2022-07-16 19:15:31 +02:00
Marcus Jaschen
fe3874370b
Use correct Git ref spec when sub_directory is specified. (#3138)
* Use correct Git ref spec when `sub_directory` is specified.

The bug is described in detail in issue #3137.

* change variable name for sub-directory target (as requested in PR)
2022-05-24 21:36:50 +02:00
Victor van Herpt Valdivia
764d3cd0b8
Add curly braces to domain in Caddyfile (#3115)
* Add curly braces to domain in Caddyfile

Adding curly braces after the domain name, allows for multiple deploys in the same server.

* regenerate doc for docs/recipe/provision/website.md

Co-authored-by: Victor van Herpt Valdivia <victor@vhvLaptop.lan>
2022-04-27 22:03:08 +02:00
Peter Jaap Blaakmeer
297e57dc3c
Remove .maintenance.flag from shared_files
Since shared files are created when they don't exist and this puts the shop in maintenance mode on each deploy, see https://github.com/deployphp/deployer/discussions/2940
2022-03-28 14:57:06 +02:00
Kamil Kuzminski
0e2f726192
Add --with-deletes flag to contao:migrate task (#3072)
* Add --with-deletes flag to contao:migrate task

* Restore the recipe command but add the docs instead

* Auto-generate the docs
2022-03-28 11:52:00 +02:00
Tom Scott-Malden
97cbbd4d79
Add username in deploy:lock error message (#3046)
* Update to the lock recipe so that it shows you who currently has the lock on the deployment

* DD#0000: feat: Updated joy test

* DD#0000: feat: Regenerated docs
2022-03-22 15:27:41 +01:00
Tom Scott-Malden
8a41b3f030
DD#0000: feat: Added configurable themes to Magento2 (#3047)
* DD#0000: feat: Added configurable themes to Magento2

* DD#0000: feat: Added concurrent jobs to static:content:deploy
2022-03-22 15:10:25 +01:00
Anton Medvedev
67686e176f Add postgress db provisioning 2022-03-20 13:07:14 +01:00
Anton Medvedev
208bf652fe Fix sub_directory update code strategy 2022-03-17 20:07:19 +01:00
chrisan
1d2da8cada
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
2022-03-13 21:07:56 +01:00
Anton Medvedev
cab76aee6b Limit release_log to 300 2022-03-13 00:45:30 +01:00
Anton Medvedev
0fac14952a Append Caddyfile instead of overriding it 2022-03-12 21:38:39 +01:00
Peter Jaap Blaakmeer
12f0c41405
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>
2022-03-12 17:42:08 +01:00
Sergei Sergeev
6351797093
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
2022-03-12 17:41:26 +01:00
Anton Medvedev
4ec52d645e
Update info.php 2022-03-03 22:20:50 +01:00
Richard Henkenjohann
7732d7ecb4
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
2022-03-03 21:44:27 +01:00
Anton Medvedev
d2a65e5a13
Add more dirs into Symfony to writable dirs
Added: 'var/cache', 'var/log', 'var/sessions'
2022-03-03 21:39:28 +01:00
matsn0w
baece5a6e3
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>
2022-03-03 21:35:25 +01:00
Laura Folco
5550911cf6
Magento2: allow non-zero-downtime deployment (#2941)
* Magento2: allow non-zero-downtime deployment; add `.maintenance.flag` to shared files

* ran docgen
2022-03-03 21:21:08 +01:00
Yanick Witschi
fdb18d0a8e
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
2022-03-03 21:15:49 +01:00
Markus Staab
4d2ddce8ad
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
2022-02-24 17:54:56 +01:00
David Palomares
68a983a8ca
Update doc provision as root (#2952)
* Provision: add alternative to using a root user
(docs and warning)

* Update docs
2022-02-09 00:22:46 +01:00
Peter Jaap Blaakmeer
abfb9bb235
Update magento2.php
Added var/.maintenance.flag as a shared file, closes issue #2940
2022-02-03 09:19:34 +01:00
Joel Pittet
238f16bba2
Update php.php (#2916)
Remove duplicate php-fpm
2022-01-22 12:32:54 +01:00
Simon Sprankel
0305fc26f0
Fix Magento version detection, fixes #2905 (#2906) 2022-01-17 21:07:32 +01:00
Dr. Ulrich Thomas Gabor
b6d646d8e3
Use -L on chgrp (#2834) 2022-01-17 19:22:12 +01:00
Jeffrey Cafferata
91f459727f
Added the Doctrine mapping files validation (with --skip option) as a (possible) deploy task. (#2901) 2022-01-15 21:20:50 +01:00
Thomas
ca6eb27232
Don't add remote user to setfacl command, if it doesn't exist as an os user (#2822)
* Update writable.php

Only add the the remote user to setfacl command if he exists as an os user.

* Replace is_int() with !empty().

run() usually returns a string, so the static analyzer throws an error, when using is_int() on its return value.

* Use test() instead of run()

Use test() instead of run to check whether the remote user also exists as an os user.
2022-01-15 13:36:13 +01:00
Anton Medvedev
a616c9ecf8
Update writable.php 2022-01-13 21:26:03 +01:00
Anton Medvedev
a52ae3da6a Small fixes 2022-01-13 14:30:46 +01:00
Anton Medvedev
a92bec4880 Remove unused use. 2022-01-13 14:30:42 +01:00
Alex Mayer
2ff8593027
Refactor deploy:cleanup Command (#2788)
* Refactor deploy:cleanup Command

Remove $runOpts since it's not actually used
Move release symlink deletion to beginning of method. This will
allow the release symlink to be deleted even if deleting the old
releases fails.

* Refactor deploy:releases_log

Fixes issue where multiple failed releases in a row cause old
releases to not be cleaned up.

Fixes #2759

Co-authored-by: Anton Medvedev <anton@medv.io>
2022-01-13 14:29:32 +01:00
Anton Medvedev
45e4708aad Use StrictHostKeyChecking=accept-new by default
Don't prefix composer with {{bin/php}} if the composer found with which().
2022-01-13 14:17:08 +01:00
Anton Medvedev
fb6f2154ef Use StrictHostKeyChecking=accept-new by default
I deleted code which was doing known_host population manually as it was buggy. The StrictHostKeyChecking=accept-new is exactly what we need.
2022-01-11 19:56:59 +01:00
Anton Medvedev
1b5d18ae7d Move git related options to update_code.php 2022-01-11 19:56:59 +01:00
Luca Rath-Heel
8c14ae44b7
Cd to deploy_path in release_name callback
* Update release.php

* Run bin/docgen

* Update release.php
2022-01-11 19:07:29 +01:00
Dr. Ulrich Thomas Gabor
43953628cf
Fix for #2850 (#2852): whoami fails on some hosters 2022-01-10 19:49:04 +01:00
Jorge M. González Martín
f159c35b8d
use the configured php version (#2886) 2022-01-07 23:01:22 +01:00
Dr. Ulrich Thomas Gabor
2a00fbd0be
Removed not existing directory (#2835) 2021-12-14 10:49:43 +01:00
Alex Mayer
d3bda13361
Update CakePHP Migration Task (#2831)
Update migration task to use current best practices
2021-12-13 20:28:23 +01:00
Jérémy DECOOL
17a02456e3
Add PHP 8.1 in the PHP provision recipe (#2830)
* Upgrade PHP 5.x to the latest branch (5.6)

* Add PHP 8.1 to the PHP provision recipe

* Set PHP 8.1 as default PHP provisioned version
2021-12-11 16:02:28 +01:00
Philipp Z
33cd103f46
Fix temporary workaround in Shopware recipe (#2755)
* Remove temporary workaround in Shopware recipe

The workaround is no longer needed, since it was fixed in Shopware 6.4.6.0 (NEXT-17720)

* Reverted removal of temporary workaround

Kept workaround for Shopware installations <6.4.6.0 and added comment for information on fixed version

* Fail silently for shopware < 6.4.6 on different absolute paths in theme config

* Updated docs for shopware recipe

Co-authored-by: Philipp Zabel <pza@hair-shop.com>
2021-11-30 18:32:42 +01:00
Alex Mayer
24e0a91ac7
Laravel: Add Route Cache to Deploy Tasks (#2789)
Caching Routes has been recommended since the early 5.x days to
improve performace or production apps.
https://laravel.com/docs/8.x/deployment#optimizing-route-loading

Reorder optimization commands to same order as Laravel docs.
2021-11-29 09:27:21 +01:00
Anton Medvedev
12ae7f09ca
Update provision.php 2021-11-22 22:51:18 +01:00