-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
120 lines (112 loc) · 2.5 KB
/
Copy pathdocker-compose.yml
File metadata and controls
120 lines (112 loc) · 2.5 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
version: '3.8'
services:
# Frontend Development
frontend-shell:
build:
context: .
dockerfile: ./apps/frontend/shell/Dockerfile.dev
ports:
- "3000:3000"
volumes:
- ./:/app
- /app/node_modules
environment:
- NODE_ENV=development
- VITE_API_URL=http://localhost:8080
depends_on:
- api-gateway
# Backend Services
api-gateway:
build:
context: .
dockerfile: ./apps/backend/api-gateway/Dockerfile.dev
ports:
- "8080:8080"
volumes:
- ./:/app
environment:
- ENV=development
- PORT=8080
- AUTH_SERVICE_URL=http://auth-service:8081
- BLOG_SERVICE_URL=http://blog-service:8082
- USER_SERVICE_URL=http://user-service:8083
depends_on:
- auth-service
- blog-service
- user-service
auth-service:
build:
context: .
dockerfile: ./apps/backend/auth-service/Dockerfile.dev
ports:
- "8081:8081"
volumes:
- ./:/app
environment:
- ENV=development
- PORT=8081
- DB_HOST=postgres
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_NAME=auth_db
- JWT_SECRET=dev_secret_key
depends_on:
- postgres
blog-service:
build:
context: .
dockerfile: ./apps/backend/blog-service/Dockerfile.dev
ports:
- "8082:8082"
volumes:
- ./:/app
environment:
- ENV=development
- PORT=8082
- DB_HOST=postgres
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_NAME=blog_db
depends_on:
- postgres
user-service:
build:
context: .
dockerfile: ./apps/backend/user-service/Dockerfile.dev
ports:
- "8083:8083"
volumes:
- ./:/app
environment:
- ENV=development
- PORT=8083
- DB_HOST=postgres
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_NAME=user_db
depends_on:
- postgres
# Database
postgres:
image: postgres:15-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_MULTIPLE_DATABASES=auth_db,blog_db,user_db
volumes:
- postgres-data:/var/lib/postgresql/data
- ./infrastructure/docker/postgres/init-multiple-dbs.sh:/docker-entrypoint-initdb.d/init-multiple-dbs.sh
# Development Tools
adminer:
image: adminer
ports:
- "8888:8080"
depends_on:
- postgres
volumes:
postgres-data: