-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update configuration of badges (#32)
* Update configuration of badges * Set up eslint correctly with typescript * fix all eslint errors * Update action dependencies * Tweak elint setup * Just run eslint * eslint stuff again * more eslint stuff * update lint script * cleanup * Use npm * update dockerfile * Update tests * Use specific mailslurp inbox * Add missing env variables to example * Start test environment * use environmental variables * use correct env * tests envalid stuff * import dotenv * copy env file * 🍕 spicy jalapeones * env struggle * env file action again * cici * add own reporter * fix env var * await on close worker * jest force exit
- Loading branch information
Showing
22 changed files
with
6,134 additions
and
4,872 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
dist | ||
node_modules | ||
.github | ||
**/*.test.ts | ||
jest.config.ts |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": ["./tsconfig.json"] | ||
}, | ||
"plugins": ["@typescript-eslint"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,47 @@ | ||
# Based on best pratices provided by Snyk.io | ||
# https://snyk.io/blog/10-best-practices-to-containerize-nodejs-web-applications-with-docker/ | ||
|
||
# base node image | ||
FROM node:18-bullseye-slim as base | ||
# --------------> The build image | ||
FROM node:20.8.0-bullseye-slim AS base | ||
RUN apt-get update && apt-get install -y --no-install-recommends dumb-init | ||
|
||
# set for base and all layer that inherit from it | ||
# ENV NODE_ENV production | ||
|
||
# Install all noe_modules, including dev dependencies | ||
# Install all node_modules, including dev dependencies | ||
FROM base as deps | ||
|
||
WORKDIR /app | ||
|
||
ADD package.json yarn.lock ./ | ||
RUN yarn install | ||
COPY package*.json /app | ||
RUN npm ci | ||
|
||
# Build the app | ||
FROM base as build | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=deps /app/node_modules /app/node_modules | ||
ADD . . | ||
RUN yarn build | ||
COPY . . | ||
RUN npm run build | ||
|
||
# Setup production node_modules | ||
FROM base as production-deps | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=deps /app/node_modules /app/node_modules | ||
ADD package.json yarn.lock ./ | ||
RUN yarn install --production | ||
ADD package*.json ./ | ||
RUN npm prune --omit=dev | ||
|
||
# Finally, build the production image with minimal footprint | ||
# --------------> The production image | ||
FROM base | ||
|
||
WORKDIR /app | ||
ENV NODE_ENV production | ||
COPY --from=base /usr/bin/dumb-init /usr/bin/dumb-init | ||
|
||
COPY --from=production-deps /app/node_modules /app/node_modules | ||
USER node | ||
|
||
COPY --from=build /app/dist /app/dist | ||
ADD . . | ||
WORKDIR /app | ||
COPY --chown=node:node --from=production-deps /app/node_modules /app/node_modules | ||
COPY --chown=node:node --from=build /app/dist /app/dist | ||
COPY --chown=node:node . . | ||
|
||
CMD ["node", "dist/index.js"] | ||
CMD ["dumb-init", "node", "dist/index.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.