Skip to content

Commit

Permalink
Merge branch 'main' into report-routes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgtennant committed Mar 29, 2024
2 parents 372512c + 0afbe33 commit b099c54
Show file tree
Hide file tree
Showing 7 changed files with 349 additions and 21,559 deletions.
7 changes: 4 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# RedHat UBI 8 with nodejs 14
# RedHat UBI 8 with an updated version of Node.js
FROM registry.access.redhat.com/ubi8/ubi as builder
RUN dnf module install -y nodejs:14

RUN dnf module enable -y nodejs:16 && dnf install -y nodejs

# Install packages, build and keep only prod packages
WORKDIR /app
Expand All @@ -11,7 +12,7 @@ RUN npm ci --only=prod && \
# Deployment container
FROM registry.access.redhat.com/ubi8/ubi-micro

# Set node to production
# Set node to production
ENV NODE_ENV production

# Node packages and dependencies
Expand Down
8,443 changes: 273 additions & 8,170 deletions backend/package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,23 @@
"express-session": "^1.17.3",
"joi": "^17.6.0",
"jwt-decode": "^3.1.2",
"multer": "^1.4.5-lts.1",
"nestjs-session": "^3.0.1",
"pg": "^8.8.0",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.5.7",
"session-file-store": "^1.5.0",
"swagger-ui-express": "^4.6.0",
"typeorm": "^0.3.10",
"uuid": "^8.3.2"
"uuid": "^8.3.2",
"@types/multer": "^1.4.11"
},
"devDependencies": {
"@types/base-64": "^1.0.0",
"@types/express": "^4.17.14",
"@types/express-session": "^1.17.4",
"@types/jest": "^27.0.2",
"@types/joi": "^17.2.3",
"@types/multer": "^1.4.7",
"@types/node": "^16.11.1",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.10.1",
Expand All @@ -100,7 +101,7 @@
"ts-node": "^10.3.0",
"tsconfig-paths": "^3.11.0",
"typescript": "^4.4.4",
"webpack": "^5.75.0"
"webpack": "^5.91.0"
},
"jest": {
"moduleFileExtensions": [
Expand Down
38 changes: 38 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# RedHat UBI 8 with nodejs 16
FROM registry.access.redhat.com/ubi8/ubi as builder

RUN dnf module enable -y nodejs:16 && dnf install -y nodejs

# Install packages, build and keep only prod packages
WORKDIR /app
COPY . ./
RUN npm ci --only=prod && \
npm run build

# Deployment container
FROM registry.access.redhat.com/ubi8/ubi-micro

# Set node to production
ENV NODE_ENV production

# Node packages and dependencies
COPY --from=builder /usr/bin/node /usr/bin/
COPY --from=builder /usr/lib64/libz.so.1 /usr/lib64/
COPY --from=builder /usr/lib64/libbrotlidec.so.1 /usr/lib64/
COPY --from=builder /usr/lib64/libbrotlienc.so.1 /usr/lib64/
COPY --from=builder /usr/lib64/libcrypto.so.1.1 /usr/lib64/
COPY --from=builder /usr/lib64/libssl.so.1.1 /usr/lib64/
COPY --from=builder /usr/lib64/libstdc++.so.6 /usr/lib64/
COPY --from=builder /usr/lib64/libgcc_s.so.1 /usr/lib64/
COPY --from=builder /usr/lib64/libbrotlicommon.so.1 /usr/lib64/

# Copy over app
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/build ./dist

# Expose port - mostly a convention, for readability
EXPOSE 3000

# Start up command
ENTRYPOINT ["node", "dist/src/main"]
Loading

0 comments on commit b099c54

Please sign in to comment.