Compare commits
1 Commits
271eb107a2
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
0dac1a5505
|
+16
-9
@@ -1,15 +1,22 @@
|
||||
FROM node:23-slim
|
||||
FROM node:24-slim AS builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy dependency files first
|
||||
COPY package*.json ./
|
||||
|
||||
# Install production dependencies only
|
||||
RUN npm ci --only=production && npm cache clean --force
|
||||
|
||||
FROM node:24-slim
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY --from=builder /usr/src/app/node_modules ./node_modules
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
COPY package.json /usr/src/app/package.json
|
||||
|
||||
RUN npm install
|
||||
|
||||
USER node
|
||||
|
||||
COPY . /usr/src/app/
|
||||
|
||||
CMD ["npm", "start"]
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "no-as-service",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "A lightweight API that returns random rejection or no reasons.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user