-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
98 lines (92 loc) · 2.4 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
98 lines (92 loc) · 2.4 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
85
86
87
88
89
90
91
92
93
94
95
96
97
services:
postgres:
image: postgres:16-alpine
container_name: haveibeendrained-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: haveibeendrained
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: haveibeendrained-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
api:
build:
context: .
dockerfile: Dockerfile
image: haveibeendrained:latest
container_name: haveibeendrained-api
working_dir: /app/packages/api
command: ["bun", "run", "dev"]
environment:
HELIUS_API_KEY: ${HELIUS_API_KEY}
SOLANA_NETWORK: ${SOLANA_NETWORK}
DATABASE_URL: ${DATABASE_URL}
REDIS_URL: ${REDIS_URL}
ANCHOR_PROVIDER_URL: ${ANCHOR_PROVIDER_URL}
ANCHOR_WALLET: ${ANCHOR_WALLET}
API_PORT: ${API_PORT}
API_BASE_URL: ${API_BASE_URL}
RATE_LIMIT_POINTS: ${RATE_LIMIT_POINTS}
RATE_LIMIT_DURATION: ${RATE_LIMIT_DURATION}
ports:
- "3001:3001"
volumes:
- .:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
frontend:
build:
context: .
dockerfile: Dockerfile
image: haveibeendrained:latest
container_name: haveibeendrained-frontend
working_dir: /app/packages/frontend
command: ["bun", "run", "dev", "--", "--host", "0.0.0.0", "--port", "3000"]
environment:
PUBLIC_API_BASE_URL: ${PUBLIC_API_BASE_URL}
ports:
- "3000:3000"
volumes:
- .:/app
depends_on:
api:
condition: service_started
anchor-build:
image: solanafoundation/anchor:v0.32.1
container_name: haveibeendrained-anchor-build
working_dir: /workspace/packages/anchor
volumes:
- .:/workspace
command: >
bash -c "
anchor --version &&
solana --version &&
cargo-build-sbf --version &&
anchor build &&
cp target/idl/drainer_registry.json ../shared/src/idl/drainer_registry.json
"
volumes:
postgres_data:
redis_data: