-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (52 loc) · 1.83 KB
/
Dockerfile
File metadata and controls
63 lines (52 loc) · 1.83 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Multi-stage Dockerfile for MEV Arbitrage Bot
FROM node:18-alpine AS base
# Install system dependencies
RUN apk add --no-cache \
python3 \
make \
g++ \
git
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
COPY tsconfig.json ./
# Install dependencies
RUN npm ci --only=production && npm cache clean --force
# Copy source code
COPY src/ ./src/
COPY contracts/ ./contracts/
COPY hardhat.config.ts ./
# Build TypeScript
RUN npm run build
# =============================================================================
# Mempool Monitor Service
# =============================================================================
FROM base AS mempool-monitor
EXPOSE 3001
CMD ["node", "dist/services/mempool-monitor/index.js"]
# =============================================================================
# Arbitrage Engine Service
# =============================================================================
FROM base AS arbitrage-engine
EXPOSE 3002
CMD ["node", "dist/services/arbitrage-engine/index.js"]
# =============================================================================
# MEV Execution Service
# =============================================================================
FROM base AS mev-execution
EXPOSE 3003
CMD ["node", "dist/services/mev-execution/index.js"]
# =============================================================================
# Monitoring Service
# =============================================================================
FROM base AS monitoring
EXPOSE 3000
CMD ["node", "dist/services/monitoring/index.js"]
# =============================================================================
# Development Image
# =============================================================================
FROM base AS development
RUN npm install
EXPOSE 3000 3001 3002 3003
CMD ["npm", "run", "dev"]