-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
107 lines (101 loc) · 2.54 KB
/
compose.yaml
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
services:
register-app:
build: ./
restart: always
container_name: register-service
ports:
- "3000:3000"
environment:
DB_HOST: ${POSTGRES_HOST}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_NAME: ${POSTGRES_DB}
DB_PORT: ${POSTGRES_PORT}
JWT_SECRET: ${JWT_SECRET}
volumes:
- .:/app
- /app/node_modules
- /app/packages/reload/dist
depends_on:
- kafka
- db
command: npm run dev --workspace=services/register
user-app:
build: ./
restart: always
container_name: user-service
ports:
- "3002:3000"
environment:
DB_HOST: ${POSTGRES_HOST}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_NAME: ${POSTGRES_DB}
DB_PORT: ${POSTGRES_PORT}
JWT_SECRET: ${JWT_SECRET}
volumes:
- .:/app
- /app/node_modules
- /app/packages/reload/dist
depends_on:
- kafka
- db
command: npm run dev --workspace=services/user
inventory-app:
build: ./
restart: always
container_name: inventory-service
environment:
DB_HOST: ${POSTGRES_HOST}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_NAME: ${POSTGRES_DB}
DB_PORT: ${POSTGRES_PORT}
ports:
- "3001:3000"
volumes:
- .:/app
- /app/node_modules
- /app/packages/reload/dist
depends_on:
- kafka
- db
command: npm run dev --workspace=services/inventory
kafka:
image: bitnami/kafka:latest
container_name: kafka
ports:
- "9092:9092"
environment:
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: controller,broker
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
volumes:
- kafka_data:/bitnami/kafka
db:
image: postgres:latest
container_name: quarters-db
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
pgadmin:
image: dpage/pgadmin4
container_name: quarters-pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
ports:
- "8080:80"
depends_on:
- db
volumes:
kafka_data:
pgdata: