Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules
dist
.git
.github
.idea
.vscode
*.md
.env.example
coverage
docs
mocks
postman_collection.json
test
24 changes: 0 additions & 24 deletions .eslintrc.js

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [22.x]
node-version: [24.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -30,6 +30,9 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Install dependencies
run: npx prisma generate

- name: Run ESLint
run: npx eslint . --max-warnings 0
continue-on-error: true
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# compiled output
/dist
/node_modules
/src/generated

# Secrets
.env*
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
min-release-age=1
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILD FOR LOCAL DEVELOPMENT
###################

FROM node:22 AS development
FROM node:24-trixie-slim AS development

# Create app directory
WORKDIR /usr/src/app
Expand All @@ -24,7 +24,7 @@ COPY . .
# BUILD FOR PRODUCTION
###################

FROM node:22 AS build
FROM node:24-trixie-slim AS build

WORKDIR /usr/src/app

Expand All @@ -49,17 +49,16 @@ RUN npm prune --production && npm cache clean --force
# PRODUCTION
###################

FROM node:22 AS production
FROM node:24-trixie-slim AS production

# Donwload chromium and its dependecies
RUN apt-get update \
&& apt-get install -y wget gnupg \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Download chromium and its dependencies
RUN apt-get update
RUN apt-get install -y wget gnupg ca-certificates
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /usr/share/keyrings/google-chrome.gpg
RUN sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
RUN apt-get update
RUN apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-freefont-ttf libxss1 --no-install-recommends
RUN rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app

Expand All @@ -79,5 +78,6 @@ COPY --from=build /usr/src/app/node_modules ./node_modules
COPY --from=build /usr/src/app/dist ./dist
COPY --from=build /usr/src/app/package.json ./
COPY --from=build /usr/src/app/prisma ./prisma
COPY --from=build /usr/src/app/prisma.config.js ./

CMD ["npm", "run", "start:prod"]
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Finally, copy the contents of `.env.example` to a new file named `.env`. Replace
```bash
# Install the dependencies
npm install
# Generate files based on schema
npx prisma generate
# Then apply the migrations
npx prisma migrate dev
# Optionally seed the databse with mock data
Expand Down
35 changes: 35 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const tsParser = require('@typescript-eslint/parser')
const tsPlugin = require('@typescript-eslint/eslint-plugin')
const globals = require('globals')
const prettierRecommended = require('eslint-plugin-prettier/recommended')

module.exports = [
{
ignores: ['.eslintrc.js', 'node_modules', 'src/generated'],
},
{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
project: 'linter.tsconfig.json',
sourceType: 'module',
},
globals: {
...globals.node,
...globals.jest,
},
},
plugins: {
'@typescript-eslint': tsPlugin,
},
rules: {
...tsPlugin.configs['recommended'].rules,
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
prettierRecommended,
]
Loading
Loading