From 86063bce4a3f5b43f5f3935c0ad12059f68322a5 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Thu, 12 Jan 2023 18:35:49 +0000 Subject: [PATCH] Fix local dev hosting and allow primary foreign keys (#9330) * adding host.docker.internal mapping to PROXY_ADDRESS * Allow primary keys to be foreign key * Revert "Allow primary keys to be foreign key" This reverts commit d10dfc1e28784bc104444df9632c1f576a57c73b. Co-authored-by: Martin McKeaveney --- hosting/docker-compose.dev.yaml | 6 +++--- packages/server/scripts/dev/manage.js | 6 ------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/hosting/docker-compose.dev.yaml b/hosting/docker-compose.dev.yaml index 4dd656066d..1626d520b6 100644 --- a/hosting/docker-compose.dev.yaml +++ b/hosting/docker-compose.dev.yaml @@ -25,9 +25,9 @@ services: proxy-service: container_name: budi-nginx-dev restart: on-failure - image: nginx:latest + image: budibase/proxy:latest 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 ports: - "${MAIN_PORT}:10000" @@ -37,7 +37,7 @@ services: extra_hosts: - "host.docker.internal:host-gateway" environment: - - PROXY_ADDRESS=${PROXY_ADDRESS} + - PROXY_ADDRESS=host.docker.internal couchdb-service: # platform: linux/amd64 diff --git a/packages/server/scripts/dev/manage.js b/packages/server/scripts/dev/manage.js index 8d1a7b1585..80f21cd043 100644 --- a/packages/server/scripts/dev/manage.js +++ b/packages/server/scripts/dev/manage.js @@ -2,11 +2,6 @@ const compose = require("docker-compose") const path = require("path") 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. const CONFIG = { @@ -49,7 +44,6 @@ async function init() { BB_ADMIN_USER_PASSWORD: "", PLUGINS_DIR: "", TENANT_FEATURE_FLAGS: "*:LICENSING,*:USER_GROUPS", - PROXY_ADDRESS: isLinux() ? "172.17.0.1" : "host.docker.internal", } let envFile = "" Object.keys(envFileJson).forEach(key => {