Comments (8)
I think why not using localServer()
instead of local recipe ? @42antoine @Elfet @gordalina @johnny-bit
from recipes.
Detecting composer and other bin on local machines really complicated thing to separate some common things (mac, linux, windows, ...).
So it's better to define your own paths, like set('local/composer', '/path/to')
from recipes.
This is a bug of my PR. But i want ask: What are you think about using a localServer()
instead of local recipe?
I think it better, because local server has same interface with remote server.
I am always using localServer to deploy local stage.
from recipes.
Because i'm relatively new to the use of deployer...
If i correctly understood the use of localServer, it only did to deploy on the same computer/server you are executing the deployment, like you previously explained it @oanhnn.
In my case, i'm using local recipe to prepare deployment files : fresh project clone, composer install, npm/bower install and execute other stuff i could not execute on FTP server.
So i did the exact schema proposed in local recipe documentation.
// deploy.php
env('local_release_path', '/tmp/my_application');
/**
* Main task
*/
task('deploy', [
'deploy:prepare',
'deploy:release',
'local:update_code',
'local:vendors',
'deploy:symlink',
'cleanup',
])->desc('Deploy your project');
after('local:vendors', function() {
upload(env('local_release_path'), env('release_path'));
})->desc('Upload local to remote');
In this context, i tried to add the var "local:true" to my config file deploy.yml, like follow
prod:
local: true
host: domain.com
user: www
identity_file: ~
stage: production
deploy_path: /home/42antoine/www/demo
password:
And i got this error, that make sense because "deploy_path" exists only on remote server.
➤ Executing task deploy:prepare
↳ on [prod]
[prod] > echo $0
[prod] < sh
[prod] <
[prod] > if [ ! -d /home/42antoine/www/demo]; then mkdir -p /home/42antoine/www/demo; fi
Exception [Symfony\Component\Process\Exception\ProcessFailedException] on [prod] server
The command "if [ ! -d /home/42antoine/www/demo ]; then mkdir -p /home/42antoine/www/demo; fi" failed.
Exit Code: 1(General error)
Working directory: /Users/42antoine/Projects/demo/www
Output:
================
Error Output:
================
mkdir: /home/42antoine/www/demo: Permission denied
• done on [prod]
✘ Some errors occurred!
@Elfet, I also tried to change
env('bin/composer', function () {
return runLocally('which composer')->toString();
});
to
set('local/composer', '/usr/local/bin/composer')
Then, it seems that the "local:vendors" tries to execute the composer install in remote server by using the {{bin/composer}} variable.
Executing task local:vendors
↳ on [prod]
[prod] > if hash composer 2>/dev/null; then echo 'true'; fi
[prod] > readlink /home/42antoine/www/demo/release
[prod] < /home/42antoine/www/demo/releases/20160414073922
[prod] <
[prod] > cd /home/42antoine/www/demo/releases/20160414073922 && curl -sS https://getcomposer.org/installer | php
Exception [RuntimeException] on [prod] server
X-Powered-By: PHP/4.4.9
Content-type: text/html
<br />
<b>Parse error</b>: syntax error, unexpected T_NEW in <b>-</b> on line <b>437</b><br />
• done on [prod]
✘ Some errors occurred!
I hope this will help you see clearer on my proposal. Feel free to contradict me if I'm wrong about using the local recipe :)
from recipes.
I'm understanding your case included 2 steps:
- Deploy your project to local
- Upload you project
Uhm, i will research about this problem.
from recipes.
@42antoine I am resolved this issue by PR #48 .
Please waiting for @deployphp/maintainer merge.
from recipes.
👍
from recipes.
Hello! #48 looks mighty fine indeed 👍
from recipes.
Related Issues (20)
- Email recipe HOT 4
- [Error] Call to undefined method Symfony\Component\Console\Helper\QuestionHelper::getInputStream() HOT 5
- What about merging recipes and deployer? HOT 7
- Issue with recipe/sentry HOT 3
- [slack] No branch or commit name HOT 2
- add npm build to npm recipe
- Rsync filterperdir wrong variable HOT 2
- RocketChat Integration HOT 2
- Sentry recipe fails when there's no .git directory HOT 2
- MS Teams notification integration HOT 1
- Website recipes documentation is not aligned with repository docs
- Problems configuring cachetool
- Sentry Release/Deploy fails due to server response HOT 4
- Segmentation Fault / Slack Recipe / PHP 7.3
- Problem resolving CacheTool binary
- Catch-22: Deployer installs composer dependencies, but deployer/recipes is a dependency HOT 3
- Zulip recipe HOT 1
- releaseIsGitDirectory() needs to return 0 if it's not a git repo
- Rollbar notify do not work with --hosts option
- New cachetool release (5.X) breaks cachetool recipe expectations for PHP 7.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recipes.