Skip to content

Run Nx + Next.js builds from root context #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 9, 2024

Conversation

blidd-google
Copy link
Collaborator

Companion PR to #177 for Nx + Next.js builds. One minor difference is that the FIREBASE_APP_DIRECTORY environment variable will still need to be specified, because the server.js file will be located at standalone/<FIREBASE_APP_DIRECTORY>/server.js in the .next standalone output directory and we need to specify that path in the bundle.yaml.

@blidd-google blidd-google force-pushed the blidd-nx-nextjs-root-build branch from b621c32 to e2d6639 Compare May 9, 2024 17:28
let cmd = DEFAULT_COMMAND;
if (process.env.MONOREPO_COMMAND) {
cmd = process.env.MONOREPO_COMMAND;
// Determine which command to run the build
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move this to line 31 right above where its first used?


// Parse args to pass to the build command
let cmdArgs: string[] = [];
if (process.env.MONOREPO_BUILD_ARGS) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is MONOREPO build args set? I dont see it anywhere in the buildpacks code either

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MONOREPO_BUILD_ARGS is a new environment variable added in cl/631875763

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm missing something, but I can't seem to find MONOREPO_BUILD_ARGS in that cl. Could you help point me to it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops sorry, just uploaded the changes - should be in line 95 of firebasenx/main.go now

@blidd-google blidd-google merged commit 168b03c into main May 9, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants