-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
133 lines (123 loc) · 3.33 KB
/
docker-compose.dev.yml
File metadata and controls
133 lines (123 loc) · 3.33 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
version: '3.8'
# Development overrides for local development
services:
# Backend API with hot reload
bakery-api:
build:
context: ./apps/bakery-api
dockerfile: Dockerfile.dev
target: development
command: node simple-server.js
environment:
NODE_ENV: development
DEBUG: bakery:*
LOG_LEVEL: debug
volumes:
# Mount source code for hot reload
- ./apps/bakery-api:/app
- ./libs:/libs
- /app/node_modules
# SQLite database file for development
- ./apps/bakery-api/database.db:/app/database.db
ports:
- "9229:9229" # Node.js debugger port
# Landing Page with hot reload
bakery-landing:
build:
context: .
dockerfile: ./apps/bakery-landing/Dockerfile.dev
target: development
ports:
- "3000:3000"
environment:
NODE_ENV: development
NEXT_TELEMETRY_DISABLED: 1
volumes:
- .:/workspace
- /workspace/node_modules
- /workspace/apps/bakery-landing/.next
stdin_open: true
tty: true
# Shop Application with hot reload
bakery-shop:
build:
context: .
dockerfile: ./apps/bakery-shop/Dockerfile.dev
target: development
ports:
- "4201:4201"
environment:
NODE_ENV: development
NEXT_TELEMETRY_DISABLED: 1
volumes:
- .:/workspace
- /workspace/node_modules
- /workspace/apps/bakery-shop/.next
stdin_open: true
tty: true
# Management System with hot reload
bakery-management:
build:
context: .
dockerfile: ./apps/bakery-management/Dockerfile.dev
target: development
ports:
- "4202:4202"
environment:
NODE_ENV: development
NEXT_TELEMETRY_DISABLED: 1
volumes:
- .:/workspace
- /workspace/node_modules
- /workspace/apps/bakery-management/.next
stdin_open: true
tty: true
# Development database with exposed ports
postgres:
ports:
- "5433:5432"
environment:
POSTGRES_DB: bakery_dev
POSTGRES_USER: bakery_dev
POSTGRES_PASSWORD: bakery_dev_password
volumes:
# Persist data between restarts
- postgres-dev-data:/var/lib/postgresql/data
# Custom configuration for development
- ./docker/postgres/postgresql.dev.conf:/etc/postgresql/postgresql.conf
# Redis with persistence disabled for faster development
redis:
command: redis-server --save "" --appendonly no
ports:
- "6379:6379"
# Mailhog for email testing
mailhog:
image: mailhog/mailhog:latest
container_name: bakery-mailhog
ports:
- "1025:1025" # SMTP port
- "8025:8025" # Web UI
networks:
- bakery-network
# Adminer for database management (lighter than pgAdmin)
adminer:
image: adminer:latest
container_name: bakery-adminer
ports:
- "8080:8080"
environment:
ADMINER_DEFAULT_SERVER: postgres
depends_on:
- postgres
networks:
- bakery-network
# Development-specific Nginx configuration
nginx:
volumes:
- ./docker/nginx/nginx.dev.conf:/etc/nginx/nginx.conf:ro
# Serve static files directly in development
- ./apps/bakery-landing/public:/usr/share/nginx/html/landing:ro
- ./apps/bakery-shop/public:/usr/share/nginx/html/shop:ro
- ./apps/bakery-management/public:/usr/share/nginx/html/management:ro
volumes:
postgres-dev-data: