diff options
author | Dan Duvall <dduvall@wikimedia.org> | 2017-08-23 11:09:49 -0700 |
---|---|---|
committer | Dan Duvall <dduvall@wikimedia.org> | 2017-09-07 09:54:19 -0700 |
commit | 2a19f04679b042567dd7ed9c0208eacbb63b8d26 (patch) | |
tree | 83ff73c2a91f681ea5014623b96869f6957c76d5 /blubber.example.yaml | |
parent | 373358d794c5fb2c8640807f4118bf29cb883cb2 (diff) | |
download | blubber-2a19f04679b042567dd7ed9c0208eacbb63b8d26.tar.gz |
Define `NODE_ENV` and always define `NODE_PATH`
Summary:
Define `NODE_ENV` based on the configuration and define `NODE_PATH` when
either `npm.install` or `npm.env` are true. The latter behavior is
necessary for final stages of multi-stage builds where npm modules are
not installed but the application requires node-related environment
variables to run.
Depends on D757
Ref T174626
Rename npm module/config to node
Renamed `npm` yaml entry to `node` and `NpmConfig` to `NodeConfig`.
Since we're dealing with general node builds and configuration, this
seems to make more sense.
Test Plan:
Run `go test ./...` or `arc unit`. Run blubber against at least the
`blubber.example.yaml`.
Reviewers: thcipriani, mobrovac, mmodell, #release-engineering-team
Reviewed By: thcipriani, #release-engineering-team
Tags: #release-engineering-team
Maniphest Tasks: T174626
Differential Revision: https://phabricator.wikimedia.org/D759
Diffstat (limited to 'blubber.example.yaml')
-rw-r--r-- | blubber.example.yaml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/blubber.example.yaml b/blubber.example.yaml index e160ace..4cea7c3 100644 --- a/blubber.example.yaml +++ b/blubber.example.yaml @@ -2,8 +2,8 @@ base: debian:jessie apt: packages: [libjpeg, libyaml] -npm: - install: true +node: + dependencies: true runs: in: /srv/service as: runuser @@ -27,10 +27,10 @@ variants: production: base: debian:jessie-slim - npm: + node: env: production artifacts: - from: test source: /srv/service destination: . - entrypoint: [npm, start] + entrypoint: [node, server.js] |