-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
86 lines (80 loc) · 2.01 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
86 lines (80 loc) · 2.01 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
# Docker Compose для режима разработки
version: '3.8'
services:
# PostgreSQL для разработки
postgres:
image: postgres:16-alpine
container_name: hakolr-postgres-dev
restart: unless-stopped
ports:
- "5433:5432"
environment:
POSTGRES_DB: hakolr_blog
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- postgres_dev_data:/var/lib/postgresql/data
networks:
- hakolr-dev-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# Backend (NestJS) в режиме разработки
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: hakolr-backend-dev
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
ports:
- "3001:3001"
environment:
NODE_ENV: development
PORT: 3001
DB_HOST: postgres
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
DB_NAME: hakolr_blog
TYPEORM_SYNCHRONIZE: "true"
TYPEORM_LOGGING: "true"
volumes:
- ./backend:/app
- /app/node_modules
networks:
- hakolr-dev-network
command: npm run start:dev
# Frontend (Next.js) в режиме разработки
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: hakolr-frontend-dev
restart: unless-stopped
depends_on:
- backend
ports:
- "3000:3000"
environment:
NODE_ENV: development
NEXT_PUBLIC_RENDER_SCAN: "true"
# Добавьте здесь другие переменные окружения для frontend
# NEXT_PUBLIC_API_URL: http://localhost:3001
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
networks:
- hakolr-dev-network
command: npm run dev
volumes:
postgres_dev_data:
driver: local
networks:
hakolr-dev-network:
driver: bridge