Replies: 1 comment
|
For a Turborepo deployment, you don’t deploy If the apps use SSR/API routes, IIS should act as a reverse proxy to Node processes: # from repo root
pnpm install --frozen-lockfile
pnpm turbo build --filter=app-one
pnpm turbo build --filter=app-two
pnpm turbo build --filter=app-threeIn each Next app, enable standalone output: // apps/app-one/next.config.js
module.exports = {
output: "standalone",
};Then run each app separately on a different port, preferably as Windows services using something like cd apps/app-one
set PORT=3001
node .next/standalone/apps/app-one/server.jsConfigure IIS with URL Rewrite + ARR to proxy each IIS site/application to the matching local port, for example: <rule name="ReverseProxyToNextApp" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://localhost:3001/{R:1}" />
</rule>For env vars, keep them per app, e.g.: apps/app-one/.env.production
---
如果我的回答解决了您的问题,您可以点一下 **answered the question**,其实我是来解答问题,顺带着收集 Galaxy Brain 徽章的哈哈 :laughing: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
I have implemented one of my Next JS project using Turborepo, It has three apps in apps directory and in packages I've commonly shared UI Component, redux store, hooks . In development its properly working and synced with each other. Currently for deployment of this project I only have option of IIS Manager which is local web server. I don't know how to deploy all these
appsandpackages, and sync them properly on live local server. How to configure.envof those applications, because each project has its separate environment variables . You can suggest me the reference if you have it specifically for for deploying on IIS.Additional information
No response
Example
No response
All reactions