Skip to content

Commit

Permalink
Merge pull request #96 from bcgov/feature/uploadEngine
Browse files Browse the repository at this point in the history
Swap out S3 upload library and general infrastructure updates
  • Loading branch information
bcgv123 authored Dec 6, 2022
2 parents 989e7c8 + 3881de2 commit ae31e0f
Show file tree
Hide file tree
Showing 10 changed files with 10,306 additions and 6,420 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
fail-fast: true
matrix:
node-version:
- '12.x'
- '14.x'
- '16.x'
- '18.x'
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -53,14 +53,14 @@ jobs:
env:
CI: true
- name: Save Coverage Results
if: matrix.node-version == '16.x'
if: matrix.node-version == '18.x'
uses: actions/upload-artifact@v2
with:
name: coverage-app
path: ${{ github.workspace }}/app/coverage
retention-days: 1
- name: Monitor Coverage
if: "matrix.node-version == '16.x' && ! github.event.pull_request.head.repo.fork"
if: "matrix.node-version == '18.x' && ! github.event.pull_request.head.repo.fork"
uses: slavcodev/coverage-monitor-action@v1
with:
comment_mode: update
Expand Down
30 changes: 24 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
FROM docker.io/node:16.15.0-alpine
# FROM docker.io/node:16.15.0-alpine # Last known working alpine image

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

COPY . ${APP_ROOT}
WORKDIR ${APP_ROOT}/app
ENV NO_UPDATE_NOTIFIER=true

USER 0
COPY . /tmp/src
WORKDIR /tmp/src/app
RUN chown -R 1001:0 /tmp/src

USER 1001
RUN npm ci

#
# Create the final container image
#
FROM registry.access.redhat.com/ubi9/nodejs-18-minimal:1-18

ENV APP_PORT=3000 \
NO_UPDATE_NOTIFIER=true

COPY --from=builder /tmp/src ${HOME}
WORKDIR ${HOME}/app

EXPOSE ${APP_PORT}
CMD ["npm", "run", "start"]
1 change: 1 addition & 0 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ apiRouter.get('/', (_req, res) => {
gitRev: state.gitRev,
hasDb: config.has('db.enabled'),
name: process.env.npm_package_name,
nodeVersion: process.version,
version: process.env.npm_package_version
},
endpoints: ['/api/v1'],
Expand Down
Loading

0 comments on commit ae31e0f

Please sign in to comment.