adding host.docker.internal mapping to PROXY_ADDRESS

This commit is contained in:
Martin McKeaveney 2022-12-21 10:58:39 +00:00
parent 315d999dff
commit 1dcd3445ce
2 changed files with 3 additions and 9 deletions

View File

@ -25,9 +25,9 @@ services:
proxy-service: proxy-service:
container_name: budi-nginx-dev container_name: budi-nginx-dev
restart: on-failure restart: on-failure
image: nginx:latest image: budibase/proxy:latest
volumes: volumes:
- ./nginx.dev.conf:/etc/nginx/nginx.conf - ./nginx.dev.conf:/etc/nginx/templates/nginx.conf.template
- ./proxy/error.html:/usr/share/nginx/html/error.html - ./proxy/error.html:/usr/share/nginx/html/error.html
ports: ports:
- "${MAIN_PORT}:10000" - "${MAIN_PORT}:10000"
@ -37,7 +37,7 @@ services:
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
environment: environment:
- PROXY_ADDRESS=${PROXY_ADDRESS} - PROXY_ADDRESS=host.docker.internal
couchdb-service: couchdb-service:
# platform: linux/amd64 # platform: linux/amd64

View File

@ -2,11 +2,6 @@
const compose = require("docker-compose") const compose = require("docker-compose")
const path = require("path") const path = require("path")
const fs = require("fs") const fs = require("fs")
const isWsl = require("is-wsl")
function isLinux() {
return !isWsl && process.platform !== "darwin" && process.platform !== "win32"
}
// This script wraps docker-compose allowing you to manage your dev infrastructure with simple commands. // This script wraps docker-compose allowing you to manage your dev infrastructure with simple commands.
const CONFIG = { const CONFIG = {
@ -49,7 +44,6 @@ async function init() {
BB_ADMIN_USER_PASSWORD: "", BB_ADMIN_USER_PASSWORD: "",
PLUGINS_DIR: "", PLUGINS_DIR: "",
TENANT_FEATURE_FLAGS: "*:LICENSING,*:USER_GROUPS", TENANT_FEATURE_FLAGS: "*:LICENSING,*:USER_GROUPS",
PROXY_ADDRESS: isLinux() ? "172.17.0.1" : "host.docker.internal",
} }
let envFile = "" let envFile = ""
Object.keys(envFileJson).forEach(key => { Object.keys(envFileJson).forEach(key => {