Can't seem to get service containers to work

Hi, I’m trying to run a service container that receives json-rpc requests. but I can’t seem to get to it.

pipeline:
  build:
    image: ubuntu:xenial
    commands:
      - apt update && apt install -y curl
      - sleep 6
      - curl -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' 127.0.0.1:8545
services:
  ganache:
    image: trufflesuite/ganache-cli:v6.1.6

I even tried adding ports: [ 8545 ] to the service and replacing 127.0.0.1 with ganache and with drone_services_0.drone_default.

And if I run netstat inside of the commands I get:

[build:L289:21s] Proto Recv-Q Send-Q Local Address           Foreign Address         State      
[build:L290:21s] tcp        0      0 localhost:44383         *:*                     LISTEN     
[build:L291:21s] tcp        0      0 f8ec330a15e5:37422      keeton.canonical.com:80 TIME_WAIT  
[build:L292:21s] tcp        0      0 f8ec330a15e5:37438      keeton.canonical.com:80 TIME_WAIT  
[build:L293:21s] tcp        0      0 f8ec330a15e5:37420      keeton.canonical.com:80 TIME_WAIT  

Please see this thread https://www.reddit.com/r/droneci/comments/8vw2th/magical_disappearing_host_names/

Thanks,
Here the problem was that this service was only listening on localhost, so I had to change it to listen on 0.0.0.0. although later I had a problem that when I used drone’s environment it caused problems and I had to use instead export in the commands.
I still have some weird problems with tests not passing in drone but they are passing everywhere else, but this is to complex to explain here(at least until i’ll succeed to pinpoint the exact problem)