From ccdbedc5ebe7fa997fff92d952e08b81f465c3de Mon Sep 17 00:00:00 2001 From: Hugues Chocart Date: Mon, 6 May 2024 18:23:53 -0300 Subject: [PATCH] feat: allow lunary-ee to use one port (#274) --- .github/workflows/build-push-deploy.yml | 2 -- ops | 2 +- packages/frontend/next.config.js | 11 ++++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-push-deploy.yml b/.github/workflows/build-push-deploy.yml index 31791a1b..b97cc631 100644 --- a/.github/workflows/build-push-deploy.yml +++ b/.github/workflows/build-push-deploy.yml @@ -155,7 +155,6 @@ jobs: push: true tags: | lunary/lunary-ee:latest - lunary/lunary-ee:1.1.18 lunary/lunary-ee:rev-${{ steps.date.outputs.date }}-${{ steps.commit.outputs.hash }} ${{ github.event.release.tag_name != '' && format('lunary/{0}:{1}', 'lunary-ee', steps.release_tag.outputs.tag) || '' }} platforms: linux/amd64 @@ -168,7 +167,6 @@ jobs: push: true tags: | lunary/lunary-ee:latest - lunary/lunary-ee:1.1.18 lunary/lunary-ee:rev-${{ steps.date.outputs.date }}-${{ steps.commit.outputs.hash }} ${{ github.event.release.tag_name != '' && format('lunary/{0}:{1}', 'lunary-ee', steps.release_tag.outputs.tag) || '' }} platforms: linux/arm64 diff --git a/ops b/ops index c95cb3a4..e7db4bff 160000 --- a/ops +++ b/ops @@ -1 +1 @@ -Subproject commit c95cb3a4292212b237203469aae47dcbe2cd2c9b +Subproject commit e7db4bffed12becd6e4621349104dfb13568ea0f diff --git a/packages/frontend/next.config.js b/packages/frontend/next.config.js index 0f512a43..b7f87252 100644 --- a/packages/frontend/next.config.js +++ b/packages/frontend/next.config.js @@ -28,7 +28,7 @@ const nextConfig = { return [] } - return [ + const redirects = [ { source: "/ingest/:path*", destination: "https://app.posthog.com/:path*", @@ -46,6 +46,15 @@ const nextConfig = { destination: process.env.API_URL + "/api/v1/template", }, ] + + if(process.env.IS_SELF_HOSTED_MONOLITHIC) { + redirects.push({ + source: '/api/path:*', + destination: 'http://localhost:3333/api/path:*' + }) + } + + return redirects }, webpack: (config, { webpack }) => { config.plugins.push(