Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @MapColonies/vector-team
14 changes: 14 additions & 0 deletions .github/jira-integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Jira Integration
on:
pull_request:
types: [opened, edited, synchronize]

permissions:
statuses: write
pull-requests: write

jobs:
jira-validation:
runs-on: ubuntu-latest
steps:
- uses: mapcolonies/javascript-github-actions/actions/jira-integration@jira-integration-v1
16 changes: 16 additions & 0 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: PR Author Auto Assign

on:
pull_request_target:
types: [opened, reopened]

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@v2.1.1
with:
repo-token: ${{ secrets.GH_PAT }}
35 changes: 12 additions & 23 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,55 +10,44 @@ env:

jobs:
eslint:
name: Run eslint
name: Run Linters
runs-on: ubuntu-latest

strategy:
matrix:
node: [20.x, 22.x]
node: [24.x]

steps:
- name: Check out TS Project Git repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Init nodejs
uses: MapColonies/shared-workflows/actions/init-npm@init-npm-v1.0.0
- name: Init Nodejs
uses: MapColonies/shared-workflows/actions/init-npm@init-npm-v1
with:
node-version: ${{ matrix.node }}

- name: Run TS Project linters
uses: wearerequired/lint-action@v2
with:
github_token: ${{ secrets.github_token }}
# Enable linters
eslint: true
prettier: true
eslint_extensions: ts

security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
tsc: true

tests:
name: Run Tests
runs-on: ubuntu-latest
container: node:20-bullseye
container: node:24-bullseye

strategy:
matrix:
node: [20.x, 22.x]
node: [24.x]

services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:14
image: postgres:15
# Provide the password for postgres
env:
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
Expand All @@ -74,7 +63,7 @@ jobs:
--health-retries 5

minio1:
image: bitnami/minio:2022
image: bitnamilegacy/minio:2022.8.13-debian-11-r1
env:
MINIO_ROOT_USER: minioadmin1
MINIO_ROOT_PASSWORD: minioadmin1
Expand All @@ -86,7 +75,7 @@ jobs:
--health-retries 5

minio2:
image: bitnami/minio:2022
image: bitnamilegacy/minio:2022.8.13-debian-11-r1
env:
MINIO_ROOT_USER: minioadmin2
MINIO_ROOT_PASSWORD: minioadmin2
Expand All @@ -106,7 +95,7 @@ jobs:
apt-get update && apt-get install -y lsb-release curl ca-certificates
install -d /usr/share/postgresql-common/pgdg
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
apt-get update
apt-get install -y postgresql-client

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v24
19 changes: 9 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
FROM node:20-bullseye as build
FROM node:24 AS build

WORKDIR /tmp/buildApp

# Install build dependencies for sharp (Debian uses apt-get)
RUN apt-get update && apt-get install -y python3 make g++ \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp/buildApp

COPY ./package*.json ./
COPY .husky/ .husky/
RUN npm install

RUN npm install
COPY . .
RUN npm run build

FROM node:20-bullseye-slim as production
FROM node:24.10.0-alpine3.22 AS production

RUN apt-get update && apt-get install -y dumb-init \
&& rm -rf /var/lib/apt/lists/*
RUN apk add dumb-init

ENV NODE_ENV=production
ENV SERVER_PORT=8080


WORKDIR /usr/src/app

COPY --chown=node:node package*.json ./
COPY .husky/ .husky/

RUN npm ci --only=production

COPY --chown=node:node --from=build /tmp/buildApp/dist .
COPY --chown=node:node ./config ./config


USER node
EXPOSE ${SERVER_PORT}
EXPOSE 8080
CMD ["dumb-init", "node", "--import", "./instrumentation.mjs", "./index.js"]
Loading
Loading