basecamp / kamal

Deploy web apps anywhere.
https://kamal-deploy.org
MIT License
9.38k stars 357 forks source link

Add ENV['KAMAL_SERVICE'] to hooks #868

Open nickhammond opened 1 week ago

nickhammond commented 1 week ago

This adds ENV['KAMAL_SERVICE'] to the hooks so that there isn't any additional processing that needs to be done within your hooks to reference the service, similar to the existing ENV['KAMAL_VERSION']. An example use for this would be the docker-setup hook so that you can easily define your Docker network to be attached to your service docker network create #{ENV['KAMAL_SERVICE']}-#{ENV['KAMAL_DESTINATION']}" or just docker network create #{ENV['KAMAL_SERVICE']}.