Closed tomvo closed 7 years ago
What version do you use? Develop branch?
@miholeus nope, just the one from here: http://rocketeer.autopergamene.eu/versions/rocketeer.phar
$ rocketeer -v
Rocketeer version 2.2.5
Yeah, I have the same problem. Need time to fix it :)
Any clue on where to start looking? it’s kind of important for our deploy strategy to be able to compile assets before symlinking to current from release and deploying :-) One option would be to compile client side and copy the files over of course...
On 28 Jul 2017, at 14:53, miholeus notifications@github.com wrote:
Yeah, I have the same problem. Need time to fix it :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rocketeers/rocketeer/issues/758#issuecomment-318644114, or mute the thread https://github.com/notifications/unsubscribe-auth/ABbwmdt4P5wWG_iqHdBCOT9w-Xt5ZEQqks5sSdnhgaJpZM4Ois1-.
@Anahkiasen You have any input on this Maxime? It's kind of a deal-breaker for our current deploy strategy to go and do database migrations and asset compiling only after deploying and symlinking.
Setup is not the correct task to hook on, you should hook into before.deploy
in R2 IIRC. setup
is what is executed on the very first deploy to the server (to prep it) to create the current/releases/shared folders, it's only run once but in any case the normal deploy
task runs right after. Should work in theory
You can find more infos about events over here, you're not limited to the three present in the configuration by default, there are more http://rocketeer.autopergamene.eu/II-Concepts/Events.html
Thanks for your input, much appreciated. I'm using rocketeer as a standalone version, not loaded through the application composer deps hence don't have the Facade available. Where would the best place be then to define those event listeners?
The facade should work regardless of how you load Rocketeer, it has its own bootstrap mechanism so using it as a normal static class should work in theory. Usually events can be put in .rocketeer/tasks.php
(I think events.php
also works on Rocketeer 2 but not sure)
Managed to get it working by creating an events.php
file and adding this:
<?php
use Rocketeer\Facades\Rocketeer;
Rocketeer::addTaskListeners('deploy', 'before-symlink', function ($task) {
$task->runForCurrentRelease([
'npm run prod',
]);
});
Thanks!
I just did a fresh rocketeer ignite in a fresh repo and wanted to run
npm run prod
command on remote server to run before symlinking but after cloning. Reckoned this would beafter.setup
.I have this:
Doesn't seem to work. This is the output when I run with
verbose
andpretend
, so it's missing the call to the after setup hook. I get the same output when I actually deploy.