This repository was archived by the owner on Jul 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yaml
More file actions
97 lines (93 loc) · 2.35 KB
/
compose.yaml
File metadata and controls
97 lines (93 loc) · 2.35 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
services:
api:
container_name: "api"
build:
context: ./Src
dockerfile: ServiceLayer.API/Dockerfile
platform: linux/amd64
restart: always
environment:
FUNCTIONS_WORKER_RUNTIME: "dotnet-isolated"
AzureWebJobsStorage: "${AZURE_WEB_JOBS_STORAGE}"
AzureWebJobsSecretStorageType: "files"
DatabaseConnectionString: "${DatabaseConnectionString}"
EVENT_GRID_TOPIC_URL: "${EVENT_GRID_TOPIC_URL}"
EVENT_GRID_TOPIC_KEY: "${EVENT_GRID_TOPIC_KEY}"
ports:
- "${API_PORT}:80"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:80/api/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
depends_on:
azurite:
condition: service_healthy
db:
condition: service_healthy
networks:
- backend
azurite:
container_name: "azurite"
image: mcr.microsoft.com/azure-storage/azurite:latest
restart: always
command: "azurite --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 --location /data --debug /data/debug.log"
ports:
- "${AZURITE_BLOB_PORT}:10000"
- "${AZURITE_QUEUE_PORT}:10001"
- "${AZURITE_TABLE_PORT}:10002"
healthcheck:
test: ["CMD-SHELL", "/bin/sh -c 'nc -z 127.0.0.1 10000 || exit 1'"]
interval: 10s
timeout: 5s
retries: 10
start_period: 15s
volumes:
- azurite-data:/data
networks:
- backend
db:
container_name: "db"
image: mcr.microsoft.com/mssql/server:2022-latest
restart: always
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: "${DATABASE_PASSWORD}"
MSSQL_PID: "Developer"
ports:
- "1433:1433"
user: "root"
volumes:
- db-data:/var/opt/mssql
healthcheck:
test: ["CMD-SHELL", "pgrep -f sqlservr || exit 1"]
interval: 20s
timeout: 10s
retries: 6
start_period: 60s
networks:
- backend
db-setup:
container_name: "db-setup"
build:
context: ./database
dockerfile: Dockerfile
restart: "no"
environment:
DATABASE_PASSWORD: "${DATABASE_PASSWORD}"
depends_on:
db:
condition: service_healthy
networks:
- backend
networks:
backend:
name: backend-network
driver: bridge
volumes:
azurite-data:
name: azurite-data
db-data:
name: db-data
driver: local