forked from Open-audit-foundation/Open-Audit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (56 loc) · 2.02 KB
/
Copy pathdocker-compose.yml
File metadata and controls
60 lines (56 loc) · 2.02 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
# docker-compose.yml — full local development stack.
#
# Usage:
# cp .env.example .env.local # fill in Stellar endpoint vars
# docker compose up --build
#
# Services boot in dependency order: redis → app.
# Health checks ensure redis is accepting connections before the app starts.
services:
# ── Redis ────────────────────────────────────────────────────────────────────
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
# Persist data across container restarts during local development.
volumes:
- redis_data:/data
command: redis-server --save 60 1 --loglevel warning
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
# ── Application ──────────────────────────────────────────────────────────────
app:
build:
context: .
dockerfile: Dockerfile
# Buildx multi-platform target — matches the CI workflow.
# Remove the platform line if your local Docker daemon doesn't support
# cross-compilation (it will default to the host architecture).
args:
BUILDKIT_INLINE_CACHE: "1"
ports:
- "3000:3000" # HTTP dashboard + WebSocket (/ws/events on same port)
env_file:
- .env.local # NEXT_PUBLIC_* and SENTRY_DSN live here
environment:
NODE_ENV: production
PORT: "3000"
# Point the app at the compose-networked Redis instance.
REDIS_URL: redis://redis:6379
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"]
interval: 15s
timeout: 5s
retries: 5
start_period: 40s
volumes:
redis_data: