-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
55 lines (49 loc) · 1.11 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
55 lines (49 loc) · 1.11 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
# Better Docker strategy: Only backend services
version: '3.9'
services:
# Backend in Docker - works great
backend:
build:
context: .
dockerfile: Dockerfile.backend
command: npm run dev:backend
volumes:
- ./backend:/workspace/backend
- ./packages:/workspace/packages
- ./package.json:/workspace/package.json
ports:
- "3000:3000"
- "5432:5432" # PostgreSQL if needed
environment:
- NODE_ENV=development
networks:
- ybis-network
# Database services
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: ybis_dev
POSTGRES_USER: ybis
POSTGRES_PASSWORD: dev123
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- ybis-network
# Redis for caching
redis:
image: redis:7-alpine
ports:
- "6379:6379"
networks:
- ybis-network
volumes:
postgres_data:
networks:
ybis-network:
driver: bridge
# Mobile development stays on HOST
# Use: npm run dev:mobile
# Docker handles: backend + databases
# Host handles: mobile + Metro + ADB