forked from Ethereal-Future/FuTuRe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
98 lines (93 loc) · 2.78 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
98 lines (93 loc) · 2.78 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
# docker-compose.dev.yml
# Development override — hot-reload for backend (node --watch) and frontend (Vite HMR).
# Usage:
# docker compose -f docker-compose.dev.yml up
#
# Source directories are mounted as volumes so any file change is reflected
# immediately without rebuilding the image. Prisma migrations run on startup.
services:
postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_DB: future_remittance
POSTGRES_USER: future_admin
POSTGRES_PASSWORD: dev_password
ports:
- "5432:5432"
volumes:
- db_data_dev:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U future_admin -d future_remittance"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
healthcheck:
test: ["CMD-SHELL", "redis-cli ping"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "3001:3001"
volumes:
# Mount source and prisma for instant hot-reload — no image rebuild needed
- ./backend/src:/app/src
- ./backend/prisma:/app/prisma
environment:
APP_ENV: development
NODE_ENV: development
PORT: 3001
DATABASE_URL: postgresql://future_admin:dev_password@postgres:5432/future_remittance
REDIS_URL: redis://redis:6379
STELLAR_NETWORK: testnet
HORIZON_URL: https://horizon-testnet.stellar.org
ALLOWED_ORIGINS: http://localhost:3000
JWT_SECRET: dev-jwt-secret-change-me
STREAM_SECRET_ENCRYPTION_KEY: "0000000000000000000000000000000000000000000000000000000000000000"
FEE_BUMP_THRESHOLD_XLM: "2"
LOG_LEVEL: debug
CACHE_TTL_BALANCE_S: "30"
RATE_CACHE_TTL_S: "60"
CACHE_TTL_FEE_S: "120"
RATE_LIMIT_WINDOW_MS: "60000"
RATE_LIMIT_MAX: "100"
DB_POOL_MAX: "10"
DB_SHARD_COUNT: "1"
CDN_ENABLED: "false"
# node --watch provides hot-reload without nodemon; migrate on each start
command: sh -c "npx prisma migrate deploy && node --watch src/server.js"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
restart: unless-stopped
depends_on:
- backend
ports:
- "3000:3000"
volumes:
# Mount source files for Vite HMR
- ./frontend/src:/app/src
- ./frontend/public:/app/public
- ./frontend/index.html:/app/index.html
environment:
VITE_API_URL: http://localhost:3001
# Vite listens on all interfaces inside the container
HOST: "0.0.0.0"
volumes:
db_data_dev: