-
Notifications
You must be signed in to change notification settings - Fork 0
Audit, upgrade and stabilize dependencies: Node 22, Express 5, Apollo Server 4, Prisma 7 #2
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
base: mac-os-readme-fixes
Are you sure you want to change the base?
Changes from all commits
a49c349
7e5814d
fc885d8
78ed5e9
450f0d7
9eb6336
30f9fab
2238957
af13934
5d24d8b
9acfb0d
57ef9f7
b3afd93
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 |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # -------------------------------------------------- | ||
| # Disasters API — Environment Variables | ||
| # -------------------------------------------------- | ||
| # Copy this file to .env and adjust values as needed. | ||
| # cp .env.example .env | ||
| # | ||
| # When running via Docker Compose these are set in | ||
| # docker-compose.yml and this file is not required. | ||
| # -------------------------------------------------- | ||
|
|
||
| # Database connection (required) | ||
| POSTGRES_URI=postgresql://disasters:disasters_pass@localhost:5432/disasters_test | ||
|
|
||
| # Server | ||
| NODE_ENV=development | ||
| PORT=3000 | ||
|
|
||
| # CORS (comma-separated origins, or * for all) | ||
| CORS_ORIGIN=* | ||
|
|
||
| # Optional | ||
| # LOG_LEVEL=info | ||
| # RATE_LIMIT_IP_WHITELIST=127.0.0.1 | ||
| # RATE_LIMIT_IP_BLACKLIST= | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,2 @@ | ||
| #!/usr/bin/env sh | ||
| . "$(dirname -- "$0")/_/husky.sh" | ||
|
|
||
| npm run lint -- --fix | ||
| npm run format |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 22 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| # syntax=docker/dockerfile:1 | ||
|
|
||
| # --- Build stage --- | ||
| FROM node:20-alpine AS build | ||
| FROM node:22-alpine AS build | ||
| WORKDIR /app | ||
| COPY package*.json ./ | ||
| RUN npm ci --only=production && npm cache clean --force | ||
|
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. 🧩 Analysis chain🏁 Script executed: fd Dockerfile.productionRepository: goodthingsdev/disasters-api Length of output: 92 🌐 Web query:
💡 Result:
npm ci --omit=devThis omits Related:
Sources
🏁 Script executed: cat -n Dockerfile.productionRepository: goodthingsdev/disasters-api Length of output: 732 Build stage installs only production dependencies but then runs
Additionally, 🐛 Proposed fixesLine 7 (build stage): -RUN npm ci --only=production && npm cache clean --force
+RUN npm ci && npm cache clean --forceLine 18 (production stage): -RUN npm ci --only=production && npm cache clean --force
+RUN npm ci --omit=dev && npm cache clean --force🤖 Prompt for AI Agents |
||
| COPY . . | ||
| RUN npm run build | ||
|
|
||
| # --- Production stage --- | ||
| FROM node:20-alpine AS production | ||
| FROM node:22-alpine AS production | ||
| WORKDIR /app | ||
| ENV NODE_ENV=production | ||
| COPY --from=build /app/package*.json ./ | ||
|
|
||
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.
example should not be localhost but docker-compose.yml database service