Skip to content

Commit

Permalink
Sonar cloud improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
MonicaG committed Nov 22, 2023
1 parent 0d8529c commit 816b521
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ backend:
csp:
connect-src: [ "'self'", 'http:', 'https:' ]
img-src: [ "'self'", "*.gov.bc.ca", "data:" ]
# script-src: [ "'self'", "*.gov.bc.ca" ]
frame-src: ["www.youtube.com"]
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
Expand Down
7 changes: 3 additions & 4 deletions packages/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ENV CONTAINER_SOURCE=/opt/app-root/src
WORKDIR $CONTAINER_SOURCE/
COPY $EXTERNAL_SOURCE/.yarn ./.yarn
COPY $EXTERNAL_SOURCE/.yarnrc.yml ./
RUN chmod +x $YARN
RUN chmod +x "$YARN"

# Stage 2 - Install dependencies
FROM skeleton AS deps
Expand All @@ -27,7 +27,7 @@ COPY $EXTERNAL_SOURCE/packages/app/package.json ./packages/app/package.json
COPY $EXTERNAL_SOURCE/packages/backend/package.json ./packages/backend/package.json
COPY $EXTERNAL_SOURCE/plugins/ ./plugins/

RUN $YARN install --frozen-lockfile --network-timeout 600000
RUN "$YARN" install --frozen-lockfile --network-timeout 600000

# Stage 3 - Build packages
FROM deps AS build
Expand Down Expand Up @@ -56,15 +56,14 @@ COPY $EXTERNAL_SOURCE/app-config.yaml \
$EXTERNAL_SOURCE/catalog-seed.yaml ./

# Install production dependencies
RUN $YARN install --frozen-lockfile --production --network-timeout 600000 && $YARN cache clean
RUN "$YARN" install --frozen-lockfile --production --network-timeout 600000 && "$YARN" cache clean

# Stage 5 - Build the runner image
FROM registry.access.redhat.com/ubi9/nodejs-18-minimal:1-85.1699549021 AS runner
USER 0

# Env vars
ENV YARN=./.yarn/releases/yarn-1.22.19.cjs
ENV EXTERNAL_SOURCE=.
ENV CONTAINER_SOURCE=/opt/app-root/src

WORKDIR $CONTAINER_SOURCE/
Expand Down

0 comments on commit 816b521

Please sign in to comment.