-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (28 loc) · 843 Bytes
/
Dockerfile
File metadata and controls
41 lines (28 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# $oink ↔ $midoink Bridge Server
FROM node:20-alpine AS builder
WORKDIR /app
# Install all dependencies (including dev for TypeScript)
COPY package*.json ./
RUN npm ci
# Copy source code
COPY tsconfig.json ./
COPY src ./src
# Build TypeScript
RUN npm run build
# Production image
FROM node:20-alpine
LABEL maintainer="oink-bridge"
LABEL description="Cross-chain bridge: Cardano ↔ Midnight (1:1 peg)"
WORKDIR /app
# Install production dependencies only
COPY package*.json ./
RUN npm ci --omit=dev
# Copy built files from builder
COPY --from=builder /app/dist ./dist
# Expose bridge port
EXPOSE 3008
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3008/health || exit 1
# Run bridge server
CMD ["node", "dist/bridge/server.js"]