-
Notifications
You must be signed in to change notification settings - Fork 24
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
console recent changes to merged in master #1274
base: master
Are you sure you want to change the base?
Changes from 25 commits
355a8ab
2bdd736
016dc01
d96bb2b
19283e0
74700da
9dee69b
3ed33e6
49b5801
b373ac4
b69ba14
ad9a5b8
f13f4cf
9df4256
d832441
fc6122e
bfccb0a
5420d8e
bd673e7
97b4b32
b5be48e
396673c
3fc3a41
343393e
d94b380
b5aee12
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,4 @@ COPY . . | |
EXPOSE 3000 | ||
|
||
CMD ["yarn", "prod"] | ||
# Replaced by CMD ["yarn", "prod"] | ||
|
||
|
||
# Replaced by CMD ["yarn", "prod"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Remove redundant comment The comment about CMD replacement is redundant as Git history already tracks these changes. Consider removing this line for cleaner code. -# Replaced by CMD ["yarn", "prod"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE eg_cm_generated_resource_details | ||
ADD COLUMN locale VARCHAR(50); |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -10,11 +10,11 @@ | |||||||
"build": "yarn run build-ts", | ||||||||
"build-ts": "tsc", | ||||||||
"clean": "rm -rf ./dist", | ||||||||
"serve": "node dist/index.js", | ||||||||
"serve": "if [ \"$DEBUG\" = \"true\" ]; then node --inspect=0.0.0.0:9229 dist/index.js; else node dist/index.js; fi", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security: Restrict debug port binding The debug port is currently bound to all network interfaces (0.0.0.0), which could expose the debugger in production environments. Consider restricting it to localhost or specific interfaces. Apply this change to improve security: - "serve": "if [ \"$DEBUG\" = \"true\" ]; then node --inspect=0.0.0.0:9229 dist/index.js; else node dist/index.js; fi",
+ "serve": "if [ \"$DEBUG\" = \"true\" ]; then node --inspect=127.0.0.1:9229 dist/index.js; else node dist/index.js; fi", 📝 Committable suggestion
Suggested change
|
||||||||
"start": "yarn run dev", | ||||||||
"test": "jest", | ||||||||
"dev": "ts-node-dev --respawn src/server/index.ts", | ||||||||
"prod": "yarn build && yarn serve", | ||||||||
"prod": "if [ \"$DEBUG\" = \"true\" ]; then cp tsconfig.debug.json tsconfig.json; fi && yarn build && yarn serve", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Reconsider debug configuration in production The current implementation has several concerns:
Consider:
Suggested refactor: - "prod": "if [ \"$DEBUG\" = \"true\" ]; then cp tsconfig.debug.json tsconfig.json; fi && yarn build && yarn serve",
+ "prod": "yarn build && yarn serve",
+ "debug": "[ -f tsconfig.debug.json ] && cp tsconfig.debug.json tsconfig.json && yarn build && yarn serve || echo 'Error: tsconfig.debug.json not found'", 📝 Committable suggestion
Suggested change
|
||||||||
"watch-ts": "tsc --watch" | ||||||||
}, | ||||||||
"repository": { | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider adding DEBUG environment variable
According to the summary, the
prod
script's behavior depends on theDEBUG
environment variable, but it's not defined in the Dockerfile.Add the DEBUG environment variable definition: