update service configuration to use host.docker.internal for backend connectivity

This commit is contained in:
2025-10-31 21:21:46 +05:30
parent ec33604a6f
commit a433c5067f
2 changed files with 6 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
"ingress": [ "ingress": [
{ {
"hostname": "api.ishikabhoyar.tech", "hostname": "api.ishikabhoyar.tech",
"service": "http://localhost:8080" "service": "http://host.docker.internal:8080"
}, },
{ {
"service": "http_status:404" "service": "http_status:404"

View File

@@ -4,11 +4,13 @@ services:
context: . context: .
dockerfile: Dockerfile.tunnel dockerfile: Dockerfile.tunnel
restart: unless-stopped restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
volumes: volumes:
- //var/run/docker.sock:/var/run/docker.sock - //var/run/docker.sock:/var/run/docker.sock
# Port is only exposed locally, traffic comes through the tunnel # No need to expose ports - traffic comes through the tunnel
ports: # ports:
- "127.0.0.1:8080:8080" # - "127.0.0.1:8080:8080"
environment: environment:
- PORT=8080 - PORT=8080
- CONCURRENT_EXECUTIONS=5 - CONCURRENT_EXECUTIONS=5