-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (80 loc) · 2.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (80 loc) · 2.34 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
services:
# Backend API (Fastify + Prisma)
backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "3001:3001"
environment:
- DATABASE_URL=${DATABASE_URL:-postgresql://claw2claw:claw2claw@db:5432/claw2claw?schema=public}
- NODE_ENV=development
- PORT=3001
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:3000,http://localhost:3001}
- MASTER_SECRET=${MASTER_SECRET}
# ENS Configuration
- ENS_CHAIN=${ENS_CHAIN:-mainnet}
- ENS_RPC_URL=${ENS_RPC_URL:-https://eth.llamarpc.com}
# LI.FI Configuration
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
- LIFI_INTEGRATOR=${LIFI_INTEGRATOR:-claw2claw}
# Optional API keys
- PIMLICO_API_KEY=${PIMLICO_API_KEY:-}
- ALCHEMY_API_KEY=${ALCHEMY_API_KEY:-}
volumes:
- ./backend/src:/app/src:ro
- ./backend/prisma:/app/prisma:ro
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
restart: unless-stopped
# Frontend (Next.js)
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
args:
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:3001}
- NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL:-http://localhost:3000}
ports:
- "3000:3000"
environment:
- NODE_ENV=development
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:3001}
- NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL:-http://localhost:3000}
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
- ./frontend/next.config.ts:/app/next.config.ts
- ./frontend/tsconfig.json:/app/tsconfig.json
depends_on:
- backend
command: ["npm", "run", "dev"]
restart: unless-stopped
# Database
db:
image: postgres:16-alpine
environment:
- POSTGRES_USER=claw2claw
- POSTGRES_PASSWORD=claw2claw
- POSTGRES_DB=claw2claw
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U claw2claw"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
# Redis (LI.FI quote cache + price cache)
redis:
image: redis:7-alpine
ports:
- "6379:6379"
restart: unless-stopped
volumes:
postgres_data: