@x402-crosschain/facilitator 1.0.0 → 2.0.0

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,20 +1,7 @@
1
- # Multi-stage Dockerfile for x402 Cross-Chain Facilitator
2
- # Optimized for production deployment
1
+ # Standalone Dockerfile for x402 Cross-Chain Facilitator
2
+ # This builds the facilitator independently without monorepo dependencies
3
3
 
4
- # Stage 1: Dependencies
5
- FROM node:20-alpine AS deps
6
- WORKDIR /app
7
-
8
- # Install pnpm
9
- RUN npm install -g pnpm
10
-
11
- # Copy package files
12
- COPY package.json pnpm-lock.yaml* ./
13
-
14
- # Install dependencies
15
- RUN pnpm install --frozen-lockfile --prod
16
-
17
- # Stage 2: Builder
4
+ # Stage 1: Builder
18
5
  FROM node:20-alpine AS builder
19
6
  WORKDIR /app
20
7
 
@@ -22,10 +9,10 @@ WORKDIR /app
22
9
  RUN npm install -g pnpm
23
10
 
24
11
  # Copy package files
25
- COPY package.json pnpm-lock.yaml* tsconfig.json ./
12
+ COPY package.json tsconfig.json ./
26
13
 
27
- # Install all dependencies (including devDependencies for building)
28
- RUN pnpm install --frozen-lockfile
14
+ # Install dependencies (will use package.json dependencies)
15
+ RUN pnpm install
29
16
 
30
17
  # Copy source code
31
18
  COPY src ./src
@@ -33,22 +20,29 @@ COPY src ./src
33
20
  # Build TypeScript
34
21
  RUN pnpm build
35
22
 
36
- # Stage 3: Runner
23
+ # Stage 2: Runner
37
24
  FROM node:20-alpine AS runner
38
25
  WORKDIR /app
39
26
 
40
27
  # Set environment to production
41
28
  ENV NODE_ENV=production
42
29
 
30
+ # Install pnpm (needed for production dependencies)
31
+ RUN npm install -g pnpm
32
+
43
33
  # Create non-root user for security
44
34
  RUN addgroup --system --gid 1001 nodejs && \
45
35
  adduser --system --uid 1001 facilitator
46
36
 
47
- # Copy necessary files from builder
48
- COPY --from=deps --chown=facilitator:nodejs /app/node_modules ./node_modules
49
- COPY --from=builder --chown=facilitator:nodejs /app/dist ./dist
37
+ # Copy package.json
50
38
  COPY --chown=facilitator:nodejs package.json ./
51
39
 
40
+ # Install production dependencies only
41
+ RUN pnpm install --prod
42
+
43
+ # Copy built files from builder
44
+ COPY --from=builder --chown=facilitator:nodejs /app/dist ./dist
45
+
52
46
  # Switch to non-root user
53
47
  USER facilitator
54
48
 
@@ -61,4 +55,3 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
61
55
 
62
56
  # Start the application
63
57
  CMD ["node", "dist/index.js"]
64
-