Nginx host - php not host , how to weld them two together?

hello guys, totally stuck, hoping to get some help here.

I have Nginx and PHP - two containers. Nginx i want to run in network_mode = host to get real ip addresses in access log files. PHP container - i want to remain not exposed to host. But no for some reason i can’t get it to work . Trivial situation, i believe any of you have done this before?

Here’s my file

# docker-compose.yml
version: "3.8"
    build: ./docker/nginx
    container_name: nginx
    command: nginx -g "daemon off;"
    network_mode: host
    container_name: php
    build: ./docker/php
      - "9000:9000"
      - mynet
    command: bash -c "service cron start && php-fpm" #tail -f /dev/null

I create a network mynet, specify that php uses that net, and from nginx config i access
fastcgi_pass mynet:9000;

as a result i get some error about uplink or stuff, what do i miss or what do i do wrongly?

Thank you!