question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What's the proper `CONTEXT` for local builds?

See original GitHub issue

When builds are run locally (through the Netlify CLI or programmatically), should the CONTEXT be:

  1. production?
  2. A new context such as local?

One concern I have with using production is that users might have production settings (URLs, databases, etc.) that should not be used on local machines. Having a separate local context would allow users to distinguish between both environment in their configuration file (with the context.* property).

What are your thoughts? @DavidWells @verythorough @kitop @fool

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
erquhartcommented, Feb 27, 2020

Agreed w/ @DavidWells - when running build through the CLI, build feels less like a distinct binary and more like a command. It helps to think of it this way:

  • netlify dev: builds for local development
  • netlify build: builds for production

Frontend devs are used to build scripts producing production builds.

1reaction
DavidWellscommented, Feb 26, 2020

I don’t think so. ‘netlify build’ should run the prod build

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker build - Docker Documentation
The transfer of context from the local machine to the Docker daemon is what the docker client means when you see the “Sending...
Read more >
3 Different Ways to Provide Docker Build Context - CloudBees
When talking about Docker builds, context means the source directory used when building the container. To explain this a bit better, let's look ......
Read more >
build context for docker image very large - Stack Overflow
The build context is all the files/directories in the current directory. – Nabin. Oct 20, 2019 at 5:56. 5.
Read more >
Using Contexts - CircleCI
Contexts provide a mechanism for securing and sharing environment variables across projects. The environment variables are defined as name/value pairs and ...
Read more >
Build specification reference for CodeBuild
Provides reference information about build specification (buildspec) files ... value of /usr/local/sbin:/usr/local/bin , and you set an environment variable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found