forked from Xoulomon/Scavenger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
143 lines (134 loc) · 4.77 KB
/
Copy pathdocker-compose.yml
File metadata and controls
143 lines (134 loc) · 4.77 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Scavngr local development environment
# Usage: docker compose up -d
# Stellar quickstart UI: http://localhost:8000
# Frontend: http://localhost:5173
# Backend API: http://localhost:8080
# Indexer: http://localhost:3001
# Redis: localhost:6379
# Postgres: localhost:5432
name: scavngr-dev
services:
# ── Stellar standalone network ──────────────────────────────────────────────
stellar:
image: stellar/quickstart:latest
command: --standalone --enable-soroban-rpc
ports:
- "8000:8000" # Horizon + Soroban RPC
environment:
NETWORK: standalone
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
# ── PostgreSQL ──────────────────────────────────────────────────────────────
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: scavngr
POSTGRES_PASSWORD: scavngr_dev
POSTGRES_DB: scavngr
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/seed.sql:/docker-entrypoint-initdb.d/seed.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U scavngr"]
interval: 5s
timeout: 3s
retries: 10
# ── Redis ───────────────────────────────────────────────────────────────────
redis:
image: redis:7-alpine
command: redis-server --save "" --appendonly no
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
# ── Backend (Rust / Actix-web) ──────────────────────────────────────────────
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: dev
ports:
- "8080:8080"
environment:
RUST_LOG: debug
DATABASE_URL: postgresql://scavngr:scavngr_dev@postgres:5432/scavngr
REDIS_URL: redis://redis:6379
STORAGE_PATH: /tmp
AWS_REGION: us-east-1
volumes:
- ./backend:/app
- cargo_cache:/usr/local/cargo/registry
- target_cache:/app/target
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8080/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
# ── Indexer (Node.js / TypeScript) ─────────────────────────────────────────
indexer:
build:
context: ./indexer
dockerfile: Dockerfile
target: dev
ports:
- "3001:3001"
environment:
DATABASE_URL: postgresql://scavngr:scavngr_dev@postgres:5432/scavngr
REDIS_URL: redis://redis:6379
STELLAR_RPC_URL: http://stellar:8000/soroban/rpc
NETWORK_PASSPHRASE: "Standalone Network ; February 2017"
CONTRACT_ID: ${CONTRACT_ID:-}
START_LEDGER: "0"
POLL_INTERVAL_MS: "2000"
volumes:
- ./indexer/src:/app/src
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
stellar:
condition: service_healthy
# ── Frontend (Vite / React) ─────────────────────────────────────────────────
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: dev
ports:
- "5173:5173"
environment:
VITE_CONTRACT_ID: ${CONTRACT_ID:-}
VITE_NETWORK: STANDALONE
VITE_RPC_URL: http://localhost:8000/soroban/rpc
VITE_FIREBASE_API_KEY: ${VITE_FIREBASE_API_KEY:-dev-stub}
VITE_FIREBASE_AUTH_DOMAIN: ${VITE_FIREBASE_AUTH_DOMAIN:-dev-stub}
VITE_FIREBASE_PROJECT_ID: ${VITE_FIREBASE_PROJECT_ID:-dev-stub}
VITE_FIREBASE_STORAGE_BUCKET: ${VITE_FIREBASE_STORAGE_BUCKET:-dev-stub}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${VITE_FIREBASE_MESSAGING_SENDER_ID:-dev-stub}
VITE_FIREBASE_APP_ID: ${VITE_FIREBASE_APP_ID:-dev-stub}
VITE_FIREBASE_MEASUREMENT_ID: ${VITE_FIREBASE_MEASUREMENT_ID:-dev-stub}
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
depends_on:
- backend
- indexer
volumes:
postgres_data:
cargo_cache:
target_cache: