Skip to content

Commit 88df503

Browse files
Upgrade to node 8.1.4 and switch to yarn
1 parent 1a5a71b commit 88df503

File tree

5 files changed

+3539
-3503
lines changed

5 files changed

+3539
-3503
lines changed

Dockerfile

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
1-
FROM alpine:3.5
1+
FROM node:8.1.4-alpine
22

3-
# install node
4-
RUN apk add --no-cache nodejs=6.9.2-r1 tini
3+
WORKDIR /root/cf-runtime
54

6-
# set working directory
7-
WORKDIR /app
5+
RUN apk add --no-cache bash git openssh-client
86

9-
# copy project file
10-
COPY package.json .
7+
COPY package.json ./
118

12-
# Build time argument to set NODE_ENV ('production'' by default)
13-
ARG NODE_ENV
14-
ENV NODE_ENV ${NODE_ENV:-production}
9+
COPY yarn.lock ./
1510

16-
# install node packages
17-
RUN apk add --no-cache --virtual .build-dep git && \
18-
npm set progress=false && \
19-
npm config set depth 0 && \
20-
npm install && \
21-
npm cache clean && \
22-
apk del .build-dep && \
11+
# install cf-runtime required binaries
12+
RUN apk add --no-cache --virtual deps python make g++ tini && \
13+
yarn install --frozen-lockfile --production && \
14+
yarn cache clean && \
15+
apk del deps && \
2316
rm -rf /tmp/*
2417

25-
# Set tini as entrypoint
26-
COPY . .
18+
# copy app files
19+
COPY . ./
2720

2821
# Set tini as entrypoint
2922
ENTRYPOINT ["/sbin/tini", "--"]
3023

3124
CMD ["node", "node_modules/.bin/forever", "--minUptime", "1", "--spinSleepTime", "1000", "-c", "node", "lib/index.js"]
25+

codefresh.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@ steps:
1515
- npm run gulp integ_test
1616
- npm run gulp clean
1717

18-
build-step:
18+
build_step:
19+
title: "Building production image"
1920
type: build
20-
image-name: codefresh/cf-container-logger
21+
image_name: codefresh/cf-container-logger
22+
on_success:
23+
metadata:
24+
set:
25+
- '${{build_step.imageId}}':
26+
- CF_QUALITY: true
2127

2228
push to registry:
2329
type: push

newrelic.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)