fix(services): correct NestJS build output path in all Dockerfiles
NestJS with sourceRoot: "src" outputs to dist/src/main.js not dist/main.js. Fixed CMD paths in all service Dockerfiles: - identity-service: dist/src/main.js (verified in WSL2) - wallet-service: dist/src/main.js - backup-service: dist/src/main.js - planting-service: dist/src/main.js - referral-service: dist/src/main.js - reward-service: dist/src/main.js - mpc-service: dist/src/main.js - leaderboard-service: dist/src/main.js - reporting-service: dist/src/main.js - authorization-service: dist/src/main.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a23b786797
commit
7bb4259290
|
|
@ -41,4 +41,4 @@ COPY --from=builder /app/dist ./dist
|
|||
EXPOSE 3002
|
||||
|
||||
# Start application
|
||||
CMD ["node", "dist/main"]
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
|
|
|||
|
|
@ -53,4 +53,4 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|||
CMD wget --no-verbose --tries=1 --spider http://localhost:3002/health || exit 1
|
||||
|
||||
# Start the application
|
||||
CMD ["node", "dist/main.js"]
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ COPY src ./src
|
|||
RUN npm run build
|
||||
|
||||
# Verify build output exists
|
||||
RUN ls -la dist/ && test -f dist/main.js
|
||||
RUN ls -la dist/src/ && test -f dist/src/main.js
|
||||
|
||||
# Production stage
|
||||
FROM node:20-alpine
|
||||
|
|
@ -63,4 +63,4 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
|
|||
CMD wget -q --spider http://localhost:3000/health || exit 1
|
||||
|
||||
# Start service
|
||||
CMD ["node", "dist/main.js"]
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ COPY --from=builder /app/dist ./dist
|
|||
EXPOSE 3000
|
||||
|
||||
# Start the application
|
||||
CMD ["node", "dist/main"]
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
||||
# Test stage
|
||||
FROM node:20-alpine AS test
|
||||
|
|
|
|||
|
|
@ -59,4 +59,4 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
|
|||
CMD node -e "require('http').get('http://localhost:3006/api/v1/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
|
||||
|
||||
# Start service
|
||||
CMD ["node", "dist/main.js"]
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
|
|
|||
|
|
@ -45,4 +45,4 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|||
CMD wget --no-verbose --tries=1 --spider http://localhost:3003/api/v1/health || exit 1
|
||||
|
||||
# Start the application
|
||||
CMD ["node", "dist/main"]
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
|
|
|||
|
|
@ -58,4 +58,4 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
|
|||
CMD wget -q --spider http://localhost:3004/health || exit 1
|
||||
|
||||
# Start service
|
||||
CMD ["node", "dist/main.js"]
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
|
|
|||
|
|
@ -58,4 +58,4 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
|
|||
CMD wget -q --spider http://localhost:3008/health || exit 1
|
||||
|
||||
# Start service
|
||||
CMD ["node", "dist/main.js"]
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
|
|
|||
|
|
@ -44,4 +44,4 @@ ENV PORT=3005
|
|||
EXPOSE 3005
|
||||
|
||||
# Run the application
|
||||
CMD ["node", "dist/main"]
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
|
|
|||
|
|
@ -58,4 +58,4 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
|
|||
CMD wget -q --spider http://localhost:3001/health || exit 1
|
||||
|
||||
# Start service
|
||||
CMD ["node", "dist/main.js"]
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue