[go: up one dir, main page]

Skip to content

rdela/rdela.com

Repository files navigation

rdela.com

Repo background & history:

rdela.com/credits

Deployment

Netlify / ENV vars

netlify.toml

[build]
  command = "gatsby build"
  publish = "public"

[build.environment]
  NODE_ENV = "production"
  NODE_VERSION = "--lts"
  NPM_VERSION = "[X.X.X]"
  YARN_VERSION = "[X.X.X]"

See current NPM_VERSION or YARN_VERSION.

To configure deploy contexts, you must create a file called netlify.toml in the base of your Git repository.

Set a NODE_VERSION environment variable.

The value inside can be anything you would use with nvm.

In place of a version pointer like "0.10" or "5.0" or "4.2.1", you can use the following special default aliases

node: this installs the latest version of node

For example, to make nvm default to the latest 5.9 release, the latest LTS version, or the latest node version for the current directory:

echo "5.9" > .nvmrc

echo "lts/*" > .nvmrc # to default to the latest LTS version

echo "node" > .nvmrc # to default to the latest version

NPM_VERSION

Netlify Build Image > Tools

  • Version corresponding with Node.js version. (default)
  • Any version available via NPM.

RUBY_VERSION = "default"

Removed 2022-06-02, after updating Build image selection to Ubuntu Focal 20.04 (default):

# WARNING: Your site had a deprecated version of Ruby pinned (2.3.6), which is incompatible with this
# build image. This build image only supports 2.4.x and later. We changed it to 2.7.2.
# 
# To learn how to set a custom Ruby version, visit the following link:
# https://docs.netlify.com/configure-builds/manage-dependencies/#ruby
# 
# If you set a custom Ruby version lower than 2.4.x, you will need to select a different build image (Ubuntu Xenial 16.04).
# The current build image only supports 2.4.x and later.

Was there to appease quirk that begat this lag/error I was seeing in deploy logs:

# Attempting ruby version 2.2.3, read from environment
# ** WARNING **
# Using custom ruby version 2.2.3, this will slow down the build.
# To ensure fast builds, set the RUBY_VERSION environment variable,
# or .ruby-version file, to an included ruby version.
# Included versions: 2.2.9 2.4.3 2.3.6

We support any released version of Ruby that rvm understands.

  • default - default ruby (or the system ruby if a default hasn't been set)
  • system - system ruby (state before RVM was installed)

YARN_FLAGS + YARN_VERSION

See these commits on the Gatsby Netlify CMS starter.

Removed YARN_FLAGS = "--no-ignore-optional"

Further Reading on Netlify Deployment and ENV vars

License

npm Docs > package.json > license

You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it.

If you are using a license that hasn't been assigned an SPDX identifier, or if you are using a custom license, use a string value like this one:

{ "license" : "SEE LICENSE IN <filename>" }

OpenBSD license in license.txt

Consider also setting "private": true to prevent accidental publication.

package.json#L6-L7

{
  "license": "SEE LICENSE IN license.txt",
  "private": true
}