-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (54 loc) · 1.15 KB
/
docker-compose.yml
File metadata and controls
58 lines (54 loc) · 1.15 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
services:
authentication.api:
container_name: auth-api
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "8080:8080"
build:
context: .
dockerfile: src/Authentication.Api/Dockerfile
networks:
- internal_network
restart: on-failure
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
db:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: mssql-db
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD_FILE=/run/secrets/sa_password
ports:
- "1433:1433"
volumes:
- data:/var/opt/mssql
deploy:
resources:
limits:
cpus: "2.0"
memory: 4g
reservations:
cpus: "1.0"
memory: 2g
secrets:
- sa_password
networks:
- internal_network
healthcheck:
test: ["CMD-SHELL", "sqlcmd -S localhost -U sa -P saPassword* -Q 'SELECT 1'"]
interval: 30s
timeout: 10s
retries: 3
networks:
internal_network:
driver: bridge
volumes:
data:
driver: local
secrets:
sa_password:
file: ./secrets/sa_password.txt