Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to fetch config from care #119

Merged
merged 3 commits into from
Apr 15, 2024
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
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
npm-debug.log
npm-debug.log
dist
.env
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ PASSWORD=qwerty123
PORT=8090
NODE_ENV=development

FACILITY_ID=607e2b01-5b34-451c-8259-45a4a971b0d4
CARE_API=http://localhost:8000
#SKIP_SAVING_DAILY_ROUND="true" # skip saving daily rounds in db
FACILITY_ID=00000000-0000-0000-0000-000000000000
CARE_API=http://localhost:9000 # use correct protocol
SAVE_DAILY_ROUND="true" # save daily rounds in db

POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@db:5432/teleicu_middleware?schema=public

#DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public"

SENTRY_DSN=Your sentry dsn
SENTRY_DSN=https://public@sentry.example.com/1
SENTRY_ENV=development

OCR_URL=https://careocr.coronasafe.xyz/api/predict
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,6 @@ dist
.pnp.*
images/

.DS_Store
.DS_Store

keys.json
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Run server",
"skipFiles": ["<node_internals>/**"],
"cwd": "${workspaceFolder}",
"env": {
"NODE_ENV": "debug"
},
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "debug"]
}
]
}
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:17-alpine AS build
FROM node:20-alpine AS build

WORKDIR /app

Expand All @@ -9,15 +9,18 @@ COPY . .
RUN npm run build


FROM node:17-alpine AS production
FROM node:20-alpine AS production

WORKDIR /app

COPY package.*json ./
RUN npm install --only=production
RUN npm install --omit=dev

COPY --from=build /app/prisma ./prisma
COPY --from=build /app/dist ./dist

COPY start.sh ./
RUN chmod +x start.sh

EXPOSE 8090
CMD ["npm", "run", "start:prod"]
CMD ["./start.sh"]
17 changes: 0 additions & 17 deletions generateKeySets.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sainak Why are we removing the script to generate keys?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was deleted.

18 changes: 0 additions & 18 deletions keys.json

This file was deleted.

12 changes: 12 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"watch" : [
"src",
".env"
],
"ext":"js,ts,json",
"ignore": [
"src/logs/*",
"src/**/*.{spec,test}.ts"
],
"exec": "ts-node -r tsconfig-paths/register --transpile-only src/index.ts"
}
Loading
Loading