data-primals-engine 1.3.1 → 1.3.3-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Dockerfile CHANGED
@@ -1,15 +1,25 @@
1
- # Base image
2
- FROM node:18.18.2
1
+ FROM node:20-alpine AS builder
2
+ WORKDIR /usr/src/app
3
3
 
4
- # Set working directory
5
- WORKDIR /
6
-
7
- # Copy package files and install dependencies
8
- COPY package.json ./
4
+ COPY package*.json ./
9
5
  RUN npm install
10
6
 
11
- # Copy application code
12
7
  COPY . .
13
8
 
14
- # Expose the application port
9
+ FROM node:20-alpine
10
+ WORKDIR /usr/src/app
11
+
12
+ RUN addgroup -S appgroup && adduser -S appuser -G appgroup
13
+
14
+ COPY --from=builder /usr/src/app/node_modules ./node_modules
15
+ COPY --from=builder /usr/src/app ./
16
+
17
+ RUN chown -R appuser:appgroup .
18
+
19
+ USER appuser
20
+
21
+ # Exposition du port de l'application
15
22
  EXPOSE 7633
23
+
24
+ # Commande pour lancer l'application en mode production
25
+ CMD [ "npm", "run", "server" ]
package/DockerfileTest CHANGED
@@ -1,15 +1,25 @@
1
- # Base image
2
- FROM node:18.18.2
1
+ FROM node:20-alpine AS builder
2
+ WORKDIR /usr/src/app
3
3
 
4
- # Set working directory
5
- WORKDIR /
6
-
7
- # Copy package files and install dependencies
8
- COPY package.json ./
4
+ COPY package*.json ./
9
5
  RUN npm install
10
6
 
11
- # Copy application code
12
7
  COPY . .
13
8
 
14
- # Expose the application port
9
+ FROM node:20-alpine
10
+ WORKDIR /usr/src/app
11
+
12
+ RUN addgroup -S appgroup && adduser -S appuser -G appgroup
13
+
14
+ COPY --from=builder /usr/src/app/node_modules ./node_modules
15
+ COPY --from=builder /usr/src/app ./
16
+
17
+ RUN chown -R appuser:appgroup .
18
+
19
+ USER appuser
20
+
21
+ # Exposition du port de l'application
15
22
  EXPOSE 7635
23
+
24
+ # Commande pour lancer l'application en mode production
25
+ CMD [ "npm", "run", "test" ]