-
Notifications
You must be signed in to change notification settings - Fork 3
/
compose.yaml
109 lines (102 loc) · 3.06 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
108
109
volumes:
contosoads-db:
contosoads-storage:
networks:
contosoads-network:
services:
imageprocessor:
image: ${IMAGEPROCESSOR_IMAGE:-joergjo/contosoads-imageprocessor:latest}
build:
context: ./src/ContosoAds.ImageProcessor
dockerfile: Dockerfile
environment:
- ASPNETCORE_URLS=http://*:8080
- ASPNETCORE_ENVIRONMENT=Development
- Logging__Console__FormatterName=Simple
- DAPR_HTTP_PORT=50001
- DAPR_GRPC_PORT=50002
# Set this to an actual connection string to enable tracing to Application Insights
- ApplicationInsights__ConnectionString=""
networks:
- contosoads-network
imageprocessor-dapr:
image: "daprio/daprd:1.12.3"
command: [
"./daprd",
"-app-id", "contosoads-imageprocessor",
"-app-port", "8080",
"-placement-host-address", "placement:50006",
"-dapr-http-port", "50001",
"-dapr-grpc-port", "50002",
"-resources-path", "/components" ]
volumes:
- "./components/:/components"
- "./src/ContosoAds.ImageProcessor/secrets.json:/secrets.json"
network_mode: "service:imageprocessor"
depends_on:
- imageprocessor
webapp:
image: ${WEB_IMAGE:-joergjo/contosoads-web:latest}
build:
context: ./src/ContosoAds.Web
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- ConnectionStrings__DefaultConnection=Host=db;Database=contosoads;Username=postgres;Password=pass@word1
- ImageSource__Host=127.0.0.1
- ASPNETCORE_URLS=http://*:8080
- ASPNETCORE_ENVIRONMENT=Development
- Logging__Console__FormatterName=Simple
- DAPR_HTTP_PORT=50001
- DAPR_GRPC_PORT=50002
# Set this to an actual connection string to enable tracing to Application Insights
- ApplicationInsights__ConnectionString=""
networks:
- contosoads-network
depends_on:
- db
webapp-dapr:
image: "daprio/daprd:1.12.3"
command: [
"./daprd",
"-app-id", "contosoads-web",
"-app-port", "8080",
"-placement-host-address", "placement:50006",
"-dapr-http-port", "50001",
"-dapr-grpc-port", "50002",
"-resources-path", "/components"]
volumes:
- "./components/:/components"
- "./src/ContosoAds.Web/secrets.json:/secrets.json"
network_mode: "service:webapp"
depends_on:
- webapp
db:
image: ${POSTGRES_IMAGE:-postgres:16-alpine}
volumes:
- contosoads-db:/var/lib/postgresql/data
- ./deploy/migrate.sql:/docker-entrypoint-initdb.d/1-migrate.sql
environment:
- POSTGRES_PASSWORD=pass@word1
- POSTGRES_DB=contosoads
networks:
- contosoads-network
placement:
image: "daprio/dapr:1.12.3"
command: ["./placement", "-port", "50006"]
networks:
- contosoads-network
redis:
image: ${REDIS_IMAGE:-redis:alpine}
networks:
- contosoads-network
azurite:
image: mcr.microsoft.com/azure-storage/azurite
ports:
- "10000:10000"
- "10001:10001"
volumes:
- contosoads-storage:/data
networks:
- contosoads-network