Skip to content

Commit ae31e0f

Browse files
authored
Merge pull request #96 from bcgov/feature/uploadEngine
Swap out S3 upload library and general infrastructure updates
2 parents 989e7c8 + 3881de2 commit ae31e0f

File tree

10 files changed

+10306
-6420
lines changed

10 files changed

+10306
-6420
lines changed

.github/workflows/unit-tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
fail-fast: true
2020
matrix:
2121
node-version:
22-
- '12.x'
2322
- '14.x'
2423
- '16.x'
24+
- '18.x'
2525
steps:
2626
- name: Checkout Repository
2727
uses: actions/checkout@v3
@@ -53,14 +53,14 @@ jobs:
5353
env:
5454
CI: true
5555
- name: Save Coverage Results
56-
if: matrix.node-version == '16.x'
56+
if: matrix.node-version == '18.x'
5757
uses: actions/upload-artifact@v2
5858
with:
5959
name: coverage-app
6060
path: ${{ github.workspace }}/app/coverage
6161
retention-days: 1
6262
- name: Monitor Coverage
63-
if: "matrix.node-version == '16.x' && ! github.event.pull_request.head.repo.fork"
63+
if: "matrix.node-version == '18.x' && ! github.event.pull_request.head.repo.fork"
6464
uses: slavcodev/coverage-monitor-action@v1
6565
with:
6666
comment_mode: update

Dockerfile

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
1-
FROM docker.io/node:16.15.0-alpine
1+
# FROM docker.io/node:16.15.0-alpine # Last known working alpine image
22

3-
ARG APP_ROOT=/opt/app-root/src
4-
ENV NO_UPDATE_NOTIFIER=true \
5-
APP_PORT=3000
3+
#
4+
# Build the application
5+
#
6+
FROM registry.access.redhat.com/ubi9/nodejs-18:1-17 as builder
67

7-
COPY . ${APP_ROOT}
8-
WORKDIR ${APP_ROOT}/app
8+
ENV NO_UPDATE_NOTIFIER=true
9+
10+
USER 0
11+
COPY . /tmp/src
12+
WORKDIR /tmp/src/app
13+
RUN chown -R 1001:0 /tmp/src
14+
15+
USER 1001
916
RUN npm ci
1017

18+
#
19+
# Create the final container image
20+
#
21+
FROM registry.access.redhat.com/ubi9/nodejs-18-minimal:1-18
22+
23+
ENV APP_PORT=3000 \
24+
NO_UPDATE_NOTIFIER=true
25+
26+
COPY --from=builder /tmp/src ${HOME}
27+
WORKDIR ${HOME}/app
28+
1129
EXPOSE ${APP_PORT}
1230
CMD ["npm", "run", "start"]

app/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ apiRouter.get('/', (_req, res) => {
9797
gitRev: state.gitRev,
9898
hasDb: config.has('db.enabled'),
9999
name: process.env.npm_package_name,
100+
nodeVersion: process.version,
100101
version: process.env.npm_package_version
101102
},
102103
endpoints: ['/api/v1'],

0 commit comments

Comments
 (0)