I am using docker compose and have one nginx
container serving as reverse proxy.
It works great with other peer docker containers, but I want to expose another domain that is run locally on the host (golang) and not inside another docker container.
Can't find how to achieve that atm
my docker-compose looks like
services:
proxy:
image: nginx:1.19.10
restart: on-failure
volumes:
- ./proxy/nginx.conf:/etc/nginx/nginx.conf
- ./proxy/sites/:/etc/nginx/sites/
- /etc/letsencrypt/:/etc/letsencrypt:ro
expose:
- 80
- 443
ports:
- "80:80"
- "443:443"
container_name: "kj_proxy"
supersite:
// some definition here for a node website
Question is, how can I refer inside the nginx configuration to the host ?
I can complete all configuration of server
but cannot access form inside docker container the host port 10000 where the site is served
PS:
It is very important that I can access both the host and other docker containers like I do currently by their service name. For the moment it works great accessing supersite:80
from inside my nginx container. This needs to still work + accessing the host machine like example "dockerhostwhatever:10000" for another nginx server rule