@Daniele_mirabella_ITA When you do docker-compose up you could see a docker container will be created.
Eg: rasa_action_server_container
Instead of localhost you can mention container name. URL will look something like this http://rasa_action_server_container:5055/webhook
Also add your url in url in endpoints.yml, as action server runs on separate port rasa server when triggering action it will call this action server.
Note this is only when using docker.