-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
102 lines (96 loc) · 3.49 KB
/
Copy pathdocker-compose.dev.yaml
File metadata and controls
102 lines (96 loc) · 3.49 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
# =============================================================================
# docker-compose.dev.yaml — development overrides
# Usage: docker compose -f docker-compose.yaml -f docker-compose.dev.yaml up --build
# =============================================================================
name: pern-monorepo:development
services:
# ---------------------------------------------------------------------------
# Database — expose port locally for GUI clients (TablePlus, DBeaver, etc.)
# ---------------------------------------------------------------------------
db:
container_name: pern-db-dev
ports:
- "${POSTGRES_PORT:-5432}:5432"
# ---------------------------------------------------------------------------
# pgAdmin — optional browser-based DB GUI
# ---------------------------------------------------------------------------
pgadmin:
image: dpage/pgadmin4:latest
container_name: pern-pgadmin4-dev
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@local.dev}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin}
ports:
- "${PGADMIN_PORT:-5050}:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
# ---------------------------------------------------------------------------
# API — development target with nodemon hot-reload & Node debug port
# ---------------------------------------------------------------------------
api:
image: pern-api-dev
container_name: pern-api-dev
build:
target: development
environment:
NODE_ENV: development
DEBUG: "app:*"
ports:
- "${API_PORT:-4000}:4000"
- "9229:9229" # Node.js inspector (attach VS Code / Chrome DevTools)
- "5555:5555" # optional: Prisma Studio (GUI for DB)
volumes:
# Mount source for live-reload; node_modules stays in the container
- ./apps/api/:/app/apps/api
- ./shared:/app/shared
- /app/node_modules
- /app/apps/api/node_modules
- /app/shared/packages/shared-types/node_modules
- /app/shared/packages/shared-types/dist
# ---------------------------------------------------------------------------
# Client — Next ts dev server with hot-reload
# ---------------------------------------------------------------------------
client:
image: pern-client-dev
container_name: pern-client-dev
build:
target: development
environment:
NODE_ENV: development
API_URL: http://localhost:${API_PORT:-4000}
ports:
- "${CLIENT_PORT:-3000}:3000"
volumes:
- ./apps/client/:/app/apps/client
- ./shared/:/app/shared
- /app/node_modules
- /app/apps/client/node_modules
- /app/apps/client/.next
command: ["pnpm", "dev"]
# ---------------------------------------------------------------------------
# Admin — TanStack Router dev server with hot-reload
# ---------------------------------------------------------------------------
admin:
image: pern-admin-dev
container_name: pern-admin-dev
build:
target: development
environment:
NODE_ENV: development
API_URL: http://localhost:${API_PORT:-4000}
ports:
- "${ADMIN_PORT:-5000}:5000"
volumes:
- ./apps/admin/:/app/apps/admin
- ./shared/:/app/shared
- /app/node_modules
- /app/apps/admin/node_modules
- /app/apps/admin/.tanstack
- /app/apps/admin/.vscode
command: ["pnpm", "dev"]
volumes:
pgadmin_data: