Skip to content

Commit

Permalink
chore: conflicts resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
pmstss committed Sep 5, 2024
2 parents 384cd3e + c7a46e2 commit 719046b
Show file tree
Hide file tree
Showing 782 changed files with 23,815 additions and 185,215 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
10 changes: 8 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,11 @@ KEYCLOAK_PUBLIC_CLIENT_ID=brokencrystals-client
KEYCLOAK_PUBLIC_CLIENT_SECRET=4bfb5df6-4647-46dd-bad1-c8b8ffd7caf4

BRIGHT_TOKEN=
BRIGHT_CLUSTER=app.neuralegion.com
SEC_TESTER_TARGET=http://localhost:8090
BRIGHT_CLUSTER=app.brightsec.com
SEC_TESTER_TARGET=http://localhost:3000

CHAT_API_URL=https://api-inference.huggingface.co/v1/chat/completions
CHAT_API_MODEL=meta-llama/Meta-Llama-3-8B-Instruct
CHAT_API_MAX_TOKENS=1000
CHAT_API_TOKEN=

25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/check-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "React Front-End CI checks"

on:
pull_request:
branches:
- '**'

push:
branches:
- stable
- unstable

paths:
- 'client/**'
- '.github/workflows/*client.yml'

env:
HUSKY: 0

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Disable prepare script (husky)
run: npm pkg delete scripts.prepare

- name: Install dependencies
run: npm ci --prefix=client --no-audit

- name: Check format
run: npm run format --prefix=client

- name: Lint
run: npm run lint --prefix=client

- name: Build
run: npm run build --prefix=client
57 changes: 57 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "Nest Back-End CI checks"

on:
pull_request:
branches:
- '**'

push:
branches:
- stable
- unstable

paths:
- '*'
- 'src/**'
- 'test/**'
- '.github/workflows/check.yml'

env:
HUSKY: 0

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Disable prepare script (husky)
run: npm pkg delete scripts.prepare

- name: Install dependencies
run: npm ci --no-audit

- name: Check format
run: npm run format

- name: Lint
run: npm run lint

- name: Build
run: npm run build

- name: Test
run: npm run test
40 changes: 0 additions & 40 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# compiled output
/dist
/public/build
/client/build
/node_modules

# Logs
Expand Down
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no-install commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/.github
/node_modules
/dist
/charts
/client
5 changes: 3 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all"
}
"trailingComma": "none"
}
17 changes: 17 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"sourceMaps": true,
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true,
"dynamicImport": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
},
"baseUrl": "./"
},
"minify": false
}
64 changes: 48 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,59 @@
FROM node:14
###################
# BUILD FOR LOCAL DEVELOPMENT
###################

FROM node:18-alpine AS build

WORKDIR /usr/src/app

# Copy and build NestJS server project
COPY --chown=node:node package*.json ./
COPY --chown=node:node tsconfig.build.json ./
COPY --chown=node:node tsconfig.json ./
COPY --chown=node:node nest-cli.fast.json ./
COPY --chown=node:node .env ./
COPY --chown=node:node config ./config
COPY --chown=node:node keycloak ./keycloak
COPY --chown=node:node src ./src

ENV NPM_CONFIG_LOGLEVEL=error
RUN npm ci --no-audit
RUN npm run build:fast
RUN npm prune --production

WORKDIR /var/www/
# Copy and build client project
COPY --chown=node:node client/package*.json ./client/
COPY --chown=node:node client/src ./client/src
COPY --chown=node:node client/public ./client/public
COPY --chown=node:node client/typings ./client/typings
COPY --chown=node:node client/vcs ./client/vcs
COPY --chown=node:node client/tsconfig.json ./client/tsconfig.json
COPY --chown=node:node client/vite.config.ts ./client/vite.config.ts
COPY --chown=node:node client/index.html ./client/index.html

COPY package*.json ./
ENV CYPRESS_INSTALL_BINARY=0
RUN npm ci --prefix=client --no-audit
RUN npm run build --prefix=client

RUN npm ci -q
USER node

COPY config ./config
COPY tsconfig.build.json ./
COPY tsconfig.json ./
COPY nest-cli.json ./
COPY .env ./
COPY src ./src
###################
# PRODUCTION
###################

RUN npm run build
RUN npm prune --production
FROM node:18-alpine AS production

RUN chown -R node:node /var/www/*
WORKDIR /usr/src/app

USER node
COPY --chown=node:node .env ./
COPY --chown=node:node config ./config
COPY --chown=node:node keycloak ./keycloak

ENV NODE_ENV=production
COPY --chown=node:node --from=build /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --from=build /usr/src/app/package*.json ./
COPY --chown=node:node --from=build /usr/src/app/dist ./dist

EXPOSE 3000
COPY --chown=node:node --from=build /usr/src/app/client/dist ./client/dist
COPY --chown=node:node --from=build /usr/src/app/client/vcs ./client/vcs

CMD ["npm", "run", "start:prod"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 NeuraLegion
Copyright (c) 2024 NeuraLegion

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 719046b

Please sign in to comment.