Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
73 lines (70 loc) · 2.15 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
73 lines (70 loc) · 2.15 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
# Dev stack — hot reload for both API and web.
# Usage: docker-compose -f docker-compose.dev.yml up --build
# Source is mounted at runtime — code changes reflect instantly.
# Only rebuild (--build) when dependencies change.
services:
redis:
image: redis:7-alpine
ports:
- "6380:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
api:
build:
context: .
dockerfile: Dockerfile.dev
working_dir: /app
command: pnpm --filter @info/api dev
ports:
- "8080:8080"
depends_on:
redis: { condition: service_healthy }
volumes:
- ./apps/api/src:/app/apps/api/src
healthcheck:
# Fastify listens on IPv4 0.0.0.0; `localhost` in Alpine resolves to ::1
# first, which refuses. Hit 127.0.0.1 explicitly.
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8080/health"]
interval: 30s
timeout: 5s
start_period: 30s
retries: 3
environment:
NODE_ENV: development
API_PORT: "8080"
API_HOST: "0.0.0.0"
INDEXER_GRAPHQL_URL: ${INDEXER_GRAPHQL_URL:-http://host.docker.internal:3000}
REDIS_URL: redis://redis:6379
LAVA_REST_URL: ${LAVA_REST_URL:-https://lava.rest.lava.build}
LAVA_RPC_URL: ${LAVA_RPC_URL:-https://lava.tendermintrpc.lava.build:443}
RELAYS_DB_URL: ${RELAYS_DB_URL:-}
ENABLE_HEALTH_PROBE: ${ENABLE_HEALTH_PROBE:-true}
HEALTH_PROBE_REGION: ${HEALTH_PROBE_REGION:-Local}
extra_hosts:
- "host.docker.internal:host-gateway"
web:
build:
context: .
dockerfile: Dockerfile.dev
working_dir: /app
command: pnpm --filter @info/web dev
ports:
- "3001:3000"
depends_on:
- api
volumes:
- ./apps/web/src:/app/apps/web/src
- ./apps/web/public:/app/apps/web/public
- ./apps/web/next.config.dev.ts:/app/apps/web/next.config.ts
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"]
interval: 30s
timeout: 5s
start_period: 60s
retries: 3
environment:
NODE_ENV: development
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8080}