Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .githooks/pre-commit/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
set -e

# Get the list of staged files
staged_files=$(git diff --cached --name-status | grep -E '^(A|M)' | awk '{print $2}')

# Exit early if no files are staged for addition or modification
if [[ -z "$staged_files" ]]; then
# echo "No files staged for addition or modification. Exiting without linting."
exit 0
fi

# check if any of the staged files are in the docs directory
# ignore this if any of the files from docs/.vitepress/dist is staged
if [[ -n $(echo "$staged_files" | grep -E '^docs/') ]] && [[ -z $(echo "$staged_files" | grep -E '^docs/.vitepress/dist/') ]]; then
echo "Docs have changed but not built yet. Building docs..."
docker compose run -T --rm --entrypoint "" docs npm run docs:build
echo "Docs built successfully. Please stage the changes in docs/.vitepress/dist/ and commit again."
exit 1
fi
2 changes: 1 addition & 1 deletion api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ swagger_output.json
# generated reports
reports

test.js
src/test*.js
src/test.js
coverage

Expand Down
6 changes: 3 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:19
FROM node:21

ARG APP_GID
ARG APP_UID
Expand All @@ -23,9 +23,9 @@ RUN mkdir -p /home/appuser/.local/bin
ENV PATH="/home/appuser/.local/bin/:${PATH}"

# install pnpm and install packages from pnpm-lock.yaml
RUN npm install pm2 -g
# RUN npm install pm2 -g
# RUN npm install -g pnpm
ENTRYPOINT npm ci && npx prisma generate client && exec pm2-runtime ecosystem.config.js
ENTRYPOINT npm ci && npx prisma generate client && exec node src/cluster.js
# ENTRYPOINT pnpm fetch && npx prisma db push && exec /opt/sca/app/node_modules/.bin/nodemon --signal SIGTERM src/index.js

# Entrypoint will be run in the shell mode - https://docs.docker.com/engine/reference/builder/#shell-form-entrypoint-example
Expand Down
14 changes: 13 additions & 1 deletion api/config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,20 @@
"port": 3030,
"host": "localhost"
},
"metrics": {
"cluster": {
"port": 9999
}
},
"cluster": {
"enabled": true,
"max_workers": 2,
"max_restarts": 3,
"max_restarts_interval": 10000,
"grace": 5000
},
"logger": {
"level": "debug"
"level": "info"
},
"workflow_server": {
"base_url": "http://127.0.0.1:5001",
Expand Down
1 change: 1 addition & 0 deletions api/config/localhost.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
9 changes: 0 additions & 9 deletions api/ecosystem.config.js

This file was deleted.

Loading