Skip to content

Commit

Permalink
fix: #660 Renovate babysit (#678)
Browse files Browse the repository at this point in the history
* Remove 'reflect-metadata' package from 'lib' and re npm install for admin/public/api.

* Update some nestjs to ^10.3.0

* Update nestjs piano package.

* Fix minor console error.

* Update supertest version.

* Update '@typescript-eslint/eslint-plugin'

* Use image to use nodejs 20; and caddy to 2.8.4-alpine.

* Add tag and adjust lib path

* Change back to use ubi 8 instead of ubi 9.

* Add healthcheck

* Adjust for using ubi8 instead.
  • Loading branch information
ianliuwk1019 authored Aug 21, 2024
1 parent df898f0 commit bd21faf
Show file tree
Hide file tree
Showing 10 changed files with 3,183 additions and 3,156 deletions.
4 changes: 2 additions & 2 deletions admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG port=4200


# Build container
FROM node:18.19.0-alpine3.17 AS build
FROM node:20.16.0-alpine3.19 AS build

# Install dependencies and build static content
ARG build_dir
Expand All @@ -17,7 +17,7 @@ RUN cd libs && npm ci && cd .. && \


# Deploy container
FROM caddy:2.7.6-alpine
FROM caddy:2.8.4-alpine

# Copy over Caddyfile and static content
ARG build_dir
Expand Down
2,023 changes: 953 additions & 1,070 deletions admin/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions admin/src/app/foms/summary/summary.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ <h4>Description</h4>
<div>
<h4>Details</h4>
<ul class="nv-list">
<li *ngIf="project.projectPlanCode == projectPlanCodeEnum.Fsp">
<li *ngIf="project?.projectPlanCode == projectPlanCodeEnum.Fsp">
<span class="name">FSP ID:</span>
<span class="value">
{{project?.fspId}}
</span>
</li>
<li *ngIf="project.projectPlanCode == projectPlanCodeEnum.Woodlot">
<li *ngIf="project?.projectPlanCode == projectPlanCodeEnum.Woodlot">
<span class="name">Woodlot Licence Number:</span>
<span class="value">
{{project?.woodlotLicenseNumber}}
Expand Down Expand Up @@ -169,7 +169,7 @@ <h4>Attachments</h4>

<section *ngIf="!selectedScope?.commentScopeCode">
<small>
{{project.projectPlanCode == projectPlanCodeEnum.Fsp
{{project?.projectPlanCode == projectPlanCodeEnum.Fsp
? periodOperationsTxt
: woodlotOperationsTxt
}}
Expand Down
13 changes: 8 additions & 5 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# RedHat UBI 8 with nodejs 16
FROM registry.access.redhat.com/ubi8/nodejs-18:1-86 AS builder
# RedHat UBI 8 with nodejs 20
FROM registry.access.redhat.com/ubi8/nodejs-20:1-58 AS builder

# Install packages, build and keep only prod packages
WORKDIR /app
Expand All @@ -11,15 +11,15 @@ RUN dnf install -y ca-certificates && \


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

# 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/libssl.so* /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/
Expand All @@ -33,7 +33,10 @@ COPY --from=builder /app/api/src/migrations/main ./dist/api/src/migrations/main
COPY --from=builder /app/api/src/migrations/test ./dist/api/src/migrations/test

# Expose port - mostly a convention, for readability
EXPOSE 3333
ARG port=3333
EXPOSE ${port}

HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost:${port} || exit 1

# Start up command
USER 1001
Expand Down
Loading

0 comments on commit bd21faf

Please sign in to comment.