Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Problems configuring cachetool #233

Closed
gander opened this issue Aug 15, 2019 · 0 comments
Closed

Problems configuring cachetool #233

gander opened this issue Aug 15, 2019 · 0 comments

Comments

@gander
Copy link
Contributor

gander commented Aug 15, 2019

Q A
Issue Type Bug
Deployer Version 6
Recipes Version 6
Local Machine OS Ubuntu
Remote Machine OS FreeBSD

Steps to reproduce

  1. Install recipes
  2. Install cachetool.phar as ~/bin/cachetool
  3. Configure (below)
  4. 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]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants