Skip to content

Commit

Permalink
Upgrade default Node to latest LTS
Browse files Browse the repository at this point in the history
Drop support for Boron (6.x).
  • Loading branch information
textbook committed Nov 7, 2019
1 parent 7ded5ef commit 8e55915
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 22 deletions.
25 changes: 18 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1

defaults: &defaults
docker:
- image: circleci/node:dubnium
- image: circleci/node:12.13.0

docker-e2e: &docker-e2e
steps:
Expand All @@ -17,6 +17,16 @@ jobs:
<<: *defaults
steps:
- checkout
- run:
name: Info
command: 'echo "Node: $(node -v)" && echo "NPM: v$(npm -v)"'
- run:
name: Check Node
command: |
if [[ "$(node -v)" == "v$(cat .nvmrc)" ]]; \
then echo 'Node version OK'; \
else echo 'Node version mismatch' && exit 1; \
fi
- restore_cache:
keys:
- starter-kit-deps-{{ checksum "package-lock.json" }}
Expand Down Expand Up @@ -70,11 +80,6 @@ jobs:
- store_artifacts:
path: ./e2e/screenshots
destination: screenshots
verify-boron:
environment:
NODE_RELEASE: boron
<<: *defaults
<<: *docker-e2e
verify-carbon:
environment:
NODE_RELEASE: carbon
Expand All @@ -85,6 +90,12 @@ jobs:
NODE_RELEASE: dubnium
<<: *defaults
<<: *docker-e2e
<<: *docker-e2e
verify-erbium:
environment:
NODE_RELEASE: erbium
<<: *defaults
<<: *docker-e2e

workflows:
build:
Expand All @@ -100,6 +111,6 @@ workflows:

verify:
jobs:
- verify-boron
- verify-carbon
- verify-dubnium
- verify-erbium
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.16.0
12.13.0
17 changes: 6 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODE_RELEASE=dubnium
ARG NODE_RELEASE=12.13.0

FROM node:${NODE_RELEASE}-alpine AS build

Expand All @@ -11,10 +11,7 @@ RUN echo "Node $(node -v) / NPM v$(npm -v)"
COPY ./package.json .
COPY ./package-lock.json .

RUN if [ ${NODE_RELEASE} = "boron" ]; \
then npm install; \
else npm ci; \
fi
RUN npm ci

COPY ./.babelrc .
COPY ./client /client
Expand All @@ -31,15 +28,13 @@ LABEL maintainer="Jonathan Sharpe"
COPY --from=build ./package.json .
COPY --from=build ./package-lock.json .

RUN if [ ${NODE_RELEASE} = "boron" ]; \
then npm install --only=prod; \
else npm ci --only=prod; \
fi
ENV NODE_ENV=production
ENV PORT=80

RUN npm ci

COPY --from=build ./dist /dist

ENV NODE_ENV=production
ENV PORT=80
EXPOSE 80

ENTRYPOINT [ "npm" ]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Starter Kit

[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

- [ ] Full stack ES8+ with [Babel]
- [x] [Node] LTS support (verified working on 6.x, 8.x and 10.x LTS releases)
- [x] Full stack ES8+ with [Babel]
- [x] [Node] LTS support (verified working on 8.x, 10.x and 12.x LTS releases)
- [x] [Express] server
- [x] [React] client with [Webpack]
- [x] Linting with [ESLint]
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
app:
build:
args:
- NODE_RELEASE=${NODE_RELEASE:-dubnium}
- NODE_RELEASE=${NODE_RELEASE:-12.13.0}
context: .
environment:
- NODE_ENV=development
Expand Down

0 comments on commit 8e55915

Please sign in to comment.