Skip to content

Commit 5473b39

Browse files
committed
CCM-7248: fix minor issues
1 parent ef5352c commit 5473b39

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

Dockerfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
1-
FROM node:20-alpine AS base
1+
FROM node:20-alpine AS builder
22

33
# Install necessary packages for Puppeteer
44
# Installs latest Chromium (100) package.
55
RUN apk add --no-cache \
6-
udev \
6+
chromium \
77
ttf-freefont \
8-
chromium
8+
udev
99

1010
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
1111

1212
WORKDIR /app
1313

1414
COPY package*.json ./
1515

16-
RUN npm install
16+
RUN addgroup -S nonroot \
17+
&& adduser -S nonroot -G nonroot
18+
19+
# Set permissions to add files/folders to /app
20+
RUN chown -R nonroot:nonroot /app
21+
22+
# Switch to the non-root user
23+
USER nonroot
24+
25+
RUN npm ci --ignore-scripts
1726

1827
EXPOSE 3000
1928

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
5. Open your browser and go to `localhost:3000` to view the app.
6666

67-
### Running templates and webauth projects locally
67+
### Running Team and IAM Web Auth projects locally
6868

6969
Read more in the [README.md](./local/README.md).
7070

local/.env.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
TEMPLATE_MANAGEMENT_DIR='your directory path to nhs-notify-web-template-management'
2-
AUTH_DIR='your directory path to nhs-notify-web-iam'
2+
IAM_WEBAUTH_DIR='your directory path to nhs-notify-web-iam'

local/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This has only been tried on a mac.
44

5-
If this local setup proves useful for others it would be great to move this `/local` directory to it's own github repo.
5+
If this local setup proves useful for others it would be great to move this `/local` directory to it's own GitHub repository.
66

77
## Description
88

@@ -19,7 +19,7 @@ The `docker-compose` file is hooked up to local volume of the projects so any ch
1919

2020
At first the application may take a few seconds to warm up. After the app has warmed up it's usually just as fast as running the application natively.
2121

22-
If you install a new `npm` package in either webapp then you'll need to rebuild the docker images.
22+
If you install a new `npm` package in either web application then you'll need to rebuild the docker images.
2323

2424
## Requirements
2525

local/nginx.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ events {
33
}
44

55
http {
6+
client_header_buffer_size 16k;
7+
68
upstream auth {
79
server auth:3000;
810
}

0 commit comments

Comments
 (0)