-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
47 lines (44 loc) · 1.32 KB
/
docker-compose.yml
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
services:
products-api:
build: .
ports:
- 3005:3005
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: "http://+:3005"
ConnectionStrings__DefaultConnection : "Server=mssqlserver,1433;Database=LocalDatabase;User Id=sa;Password=SqlP@ssW0rd;TrustServerCertificate=True;Encrypt=True;Integrated Security=False;"
depends_on:
- mssqlserver
- elasticsearch
mssqlserver:
image: mcr.microsoft.com/mssql/server
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: "SqlP@ssW0rd"
ports:
- 1433:1433
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P SqlP@ssW0rd -Q 'SELECT 1' || exit 1"]
interval: 10s
retries: 10
start_period: 10s
timeout: 3s
elasticsearch:
image: docker.io/bitnami/elasticsearch:7.17.10
volumes:
- elasticsearch_data:/bitnami/elasticsearch/data
environment:
- discovery.type=single-node
- node.name=elasticsearch
- xpack.security.enabled=false
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- 9200:9200
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
interval: 30s
timeout: 30s
retries: 5
volumes:
elasticsearch_data: