-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
53 lines (50 loc) · 1.85 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
53 lines (50 loc) · 1.85 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
# =============================================================================
# StudyForge — Docker Compose Development Override
# =============================================================================
# Usage: docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build
#
# Features:
# - Source code volume-mounted for hot-reload (tsx watch + Vite HMR)
# - Development Dockerfile with all build tools
# - Exposed ports for direct debugging
# - No Nginx proxy
# =============================================================================
services:
app:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
# Mount source code for hot-reload
- ./server:/app/server
- ./client:/app/client
- ./shared:/app/shared
- ./vite.config.ts:/app/vite.config.ts
- ./tsconfig.json:/app/tsconfig.json
- ./tailwind.config.ts:/app/tailwind.config.ts
- ./postcss.config.js:/app/postcss.config.js
- ./.env:/app/.env
- ./migrations:/app/migrations
- ./scripts:/app/scripts
- ./drizzle.config.ts:/app/drizzle.config.ts
# Prevent node_modules from being overwritten by the mount
- /app/node_modules
environment:
NODE_ENV: development
RUN_MIGRATIONS: "true"
POSTGRES_USER: postgres
DB_HOST: db
DB_PORT: 5432
DATABASE_URL: postgres://postgres:Postgremmudip76@db:5432/${POSTGRES_DB:-studyforge}
ports:
- "${API_PORT:-5000}:5000"
# Override entrypoint for dev (no wait logic needed, depends_on handles it)
entrypoint: []
command: ["sh", "-c", "npx drizzle-kit migrate && npx tsx watch --env-file=.env server/index.ts"]
# Expose DB and Redis ports for direct host access during development
db:
ports:
- "${DB_EXTERNAL_PORT:-5432}:5432"
redis:
ports:
- "${REDIS_EXTERNAL_PORT:-6379}:6379"