Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
181 lines (172 loc) · 4.78 KB
/
Copy pathdocker-compose.yml
File metadata and controls
181 lines (172 loc) · 4.78 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: sensorx-backend
services:
postgres:
image: postgres:16-alpine
container_name: sensorx_postgres
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: sk1234
POSTGRES_DB: sensorx_gateway
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro
healthcheck:
test:
- CMD-SHELL
- pg_isready -U postgres -d sensorx_gateway
interval: 5s
timeout: 5s
retries: 15
networks:
- backend
redis:
image: redis:7-alpine
container_name: sensorx_redis
restart: unless-stopped
command: redis-server --requirepass redis123 --appendonly yes
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test:
- CMD
- redis-cli
- -a
- redis123
- ping
interval: 5s
timeout: 5s
retries: 15
networks:
- backend
pgadmin:
image: dpage/pgadmin4:8
container_name: sensorx_pgadmin
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: admin@sensorx.com
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- "8080:80"
depends_on:
postgres:
condition: service_healthy
networks:
- backend
gateway:
build:
context: ./SensorX-gateway
dockerfile: Dockerfile
image: ducdz2903/sensorx-gateway:latest
container_name: sensorx_gateway
restart: unless-stopped
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: http://+:8080
ConnectionStrings__DefaultConnection: Host=postgres;Port=5432;Database=sensorx_gateway;Username=postgres;Password=sk1234
Redis__ConnectionString: redis:6379,password=redis123
JwtSettings__Issuer: http://localhost:5053
JwtSettings__Audience: api
JwtSettings__PrivateKeyPath: /app/Keys/private.key
JwtSettings__HmacSecret: local-dev-hmac-secret-change-me-123456
Migration__AutoApply: "true"
ports:
- "5053:8080"
volumes:
- ./SensorX-gateway/src/SensorX.Gateway.Api/Keys/private.key:/app/Keys/private.key:ro
- ./SensorX-gateway/src/SensorX.Gateway.Api/Keys/public.key:/app/Keys/public.key:ro
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- backend
data-api:
build:
context: ./SensorX.Data
dockerfile: Dockerfile
image: ducdz2903/sensorx-data-api:latest
container_name: sensorx_data_api
restart: unless-stopped
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: http://+:8080
ConnectionStrings__DefaultConnection: Host=postgres;Port=5432;Database=SensorX_Data;Username=postgres;Password=sk1234
Jwt__Authority: http://gateway:8080
Jwt__Audience: api
Jwt__RequireHttpsMetadata: "false"
Migration__AutoApply: "true"
ports:
- "5201:8080"
depends_on:
postgres:
condition: service_healthy
gateway:
condition: service_started
networks:
backend:
aliases:
- product-service
master-api:
build:
context: ./SensorX.Master
dockerfile: Dockerfile
image: ducdz2903/sensorx-master-api:latest
container_name: sensorx_master_api
restart: unless-stopped
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: http://+:8080
ConnectionStrings__DefaultConnection: Host=postgres;Port=5432;Database=SensorX_Master;Username=postgres;Password=sk1234
Jwt__Authority: http://gateway:8080
Jwt__Audience: api
Jwt__RequireHttpsMetadata: "false"
Migration__AutoApply: "true"
ports:
- "5202:8080"
depends_on:
postgres:
condition: service_healthy
gateway:
condition: service_started
networks:
backend:
aliases:
- order-service
warehouse-api:
build:
context: ./SensorX.Warehouse
dockerfile: Dockerfile
image: ducdz2903/sensorx-warehouse-api:latest
container_name: sensorx_warehouse_api
restart: unless-stopped
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: http://+:8080
ConnectionStrings__DefaultConnection: Host=postgres;Port=5432;Database=SensorX_Warehouse;Username=postgres;Password=sk1234
Jwt__Authority: http://gateway:8080
Jwt__Audience: api
Jwt__RequireHttpsMetadata: "false"
Migration__AutoApply: "true"
ports:
- "5203:8080"
depends_on:
postgres:
condition: service_healthy
gateway:
condition: service_started
networks:
backend:
aliases:
- inventory-service
volumes:
postgres_data:
redis_data:
networks:
backend:
driver: bridge