Closed m-vo closed 4 years ago
That's my task!
So, I'm aware of the issue but recently I always used the domain name as the hostname. IMO you can introduce a new config key (same as I did in 5f63db0daaf0c4bba49b213e0cf64b50f280f3d5).
Code has to be something like this:
try {
if (!$domain = get('domain')) {
$domain = get('hostmame'));
}
} catch (ConfigurationException $e) {}
PR welcome after verified that this is working properly :)
I'm closing this in favor of #14
The task
deploy:opcache_reset
currently uses the configuredhostname
to determine the url: https://github.com/terminal42/deployer-recipes/blob/1bcd95fa71ed0e9eb012a66b8805a74c27ac1bb1/recipe/deploy.php#L126-L134For me most of the time the hostname is the alias of the configured ssh identity and never of the actual publicly reachable domain. What about querying another config key (sth. like
public_hostname
ordomain
) and falling back to the hostname? :slightly_smiling_face: