Problems configuring cachetool
Closed this issue · 0 comments
gander commented
Q | A |
---|---|
Issue Type | Bug |
Deployer Version | 6 |
Recipes Version | 6 |
Local Machine OS | Ubuntu |
Remote Machine OS | FreeBSD |
Steps to reproduce
- Install recipes
- Install
cachetool.phar
as~/bin/cachetool
- Configure (below)
- Run deployment
Content of deploy.php
<?php
namespace Deployer;
require 'recipe/cachetool.php';
after('deploy:symlink', 'cachetool:clear:opcache');
host('development')
->hostname('hosting')
->stage('dev')
->set('domain', 'example.com')
->set('deploy_path', '~/domains/{{domain}}')
->set('cachetool_args', '--web --web-path={{release_path}}/public --web-url=https://{{domain}}')
->set('bin/cachetool', '~/bin/cachetool');
Output log
➤ Executing task cachetool:clear:opcache
[development] > cd ~/domains/example.com/releases/150 && (if [ -e ~/domains/example.com/releases/150/~/bin/cachetool ]; then echo 'true'; fi)
[development] > cd ~/domains/example.com/releases/150 && (curl -sO https://gordalina.github.io/cachetool/downloads/~/bin/cachetool)
[development] > cd ~/domains/example.com/releases/150 && (php ~/bin/cachetool opcache:reset --web --web-path=~/domains/example.com/releases/150/public --web-url=https://example.com)
• done on [development]
It works because it points to the correct path but creates a HTML file with github 404 error in the release directory at each deployment.
In the current form of this script I have to use the following workaround, but ladies and gentlemen, this is not the way:
set('bin/cachetool', '../../../../bin/cachetool')
Result:
➤ Executing task cachetool:clear:opcache
[development] > cd ~/domains/example.com/releases/151 && (if [ -e ~/domains/example.com/releases/151/../../../../bin/cachetool ]; then echo 'true'; fi)
[development] < true
[development] > cd ~/domains/example.com/releases/151 && (php ../../../../bin/cachetool opcache:reset --web --web-path=~/domains/example.com/releases/151/public --web-url=https://example.com)
• done on [development]