Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAAR-1031 Update dependencies #33

Merged
merged 1 commit into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
hmpps: ministryofjustice/hmpps@6.0
hmpps: ministryofjustice/hmpps@6.2
slack: circleci/slack@4.8.3

parameters:
Expand All @@ -14,7 +14,7 @@ parameters:

node-version:
type: string
default: 16.17-browsers
default: 18.12-browsers

jobs:
build:
Expand Down
34 changes: 18 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,49 +1,51 @@
# Stage: base image
ARG BUILD_NUMBER
ARG GIT_REF
FROM node:18.12-bullseye-slim as base

FROM node:16.14-bullseye-slim as base
ARG BUILD_NUMBER=1_0_0
ARG GIT_REF=not-available

LABEL maintainer="HMPPS Digital Studio <info@digital.justice.gov.uk>"

ENV TZ=Europe/London
RUN ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" > /etc/timezone

RUN addgroup --gid 2000 --system appgroup && \
adduser --uid 2000 --system appuser --gid 2000
adduser --uid 2000 --system appuser --gid 2000

WORKDIR /app

# Cache breaking
ENV BUILD_NUMBER ${BUILD_NUMBER:-1_0_0}

RUN apt-get update && \
apt-get upgrade -y
apt-get upgrade -y && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*

# Stage: build assets
FROM base as build
ARG BUILD_NUMBER
ARG GIT_REF

RUN apt-get install -y make python g++
ARG BUILD_NUMBER=1_0_0
ARG GIT_REF=not-available

RUN apt-get update && \
apt-get install -y make python g++

COPY package*.json ./
RUN CYPRESS_INSTALL_BINARY=0 npm ci --no-audit

COPY . .
RUN npm run build

ENV BUILD_NUMBER ${BUILD_NUMBER:-1_0_0}
ENV GIT_REF ${GIT_REF:-dummy}
RUN export BUILD_NUMBER=${BUILD_NUMBER} && \
export GIT_REF=${GIT_REF} && \
npm run record-build-info
export GIT_REF=${GIT_REF} && \
npm run record-build-info

RUN npm prune --no-audit --production

# Stage: copy production assets and dependencies
FROM base

RUN apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*

COPY --from=build --chown=appuser:appgroup \
/app/package.json \
/app/package-lock.json \
Expand All @@ -61,7 +63,7 @@ COPY --from=build --chown=appuser:appgroup \
COPY --from=build --chown=appuser:appgroup \
/app/node_modules ./node_modules

EXPOSE 3000
EXPOSE 3000 3001
ENV NODE_ENV='production'
USER 2000

Expand Down
2 changes: 1 addition & 1 deletion helm_deploy/hmpps-audit-poc-ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ dependencies:
version: 1.5.0
repository: https://ministryofjustice.github.io/hmpps-helm-charts
- name: generic-prometheus-alerts
version: 0.2.7
version: 1.2.1
repository: https://ministryofjustice.github.io/hmpps-helm-charts