Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
105 lines (98 loc) · 2.48 KB
/
Copy pathcompose.yml
File metadata and controls
105 lines (98 loc) · 2.48 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
services:
cert-init:
image: mcr.microsoft.com/dotnet/sdk:10.0
entrypoint: ["/bin/sh", "-c"]
command:
- |
set -e
# Docker Compose creates a directory when a single-file bind mount source
# is missing, so clean that up before (re)generating the certificate.
if [ -d /certs/localhost.pfx ]; then
rm -rf /certs/localhost.pfx
fi
if [ ! -s /certs/localhost.pfx ]; then
dotnet dev-certs https -ep /certs/localhost.pfx -p devpassword
fi
chmod 644 /certs/localhost.pfx
volumes:
- ./certs:/certs
restart: "no"
networks:
- aisra-net
db:
image: redis:8-alpine
command: redis-server --save "" --appendonly no
networks:
- aisra-net
mqtt-broker:
image: eclipse-mosquitto:2.1-alpine
ports:
- "${MQTT_PORT}:1883"
networks:
- aisra-net
dsg-web:
image: ghcr.io/prescriptiveanalytics/dsg-web:latest
depends_on:
mqtt-broker:
condition: service_started
networks:
- aisra-net
heuristic-web:
build:
context: ./backend/src
dockerfile: AIsra.HeuristicLibWeb.Server/Dockerfile
volumes:
- ./certs:/certs:ro
environment:
Kestrel__Certificates__Default__Path: /certs/localhost.pfx
env_file:
- .env
depends_on:
cert-init:
condition: service_completed_successfully
networks:
- aisra-net
aisra-web:
build:
context: ./backend/src
dockerfile: AIsra.Web/Dockerfile
ports:
- "${AGENT_PORT}:${AGENT_PORT}"
volumes:
- ./certs:/certs:ro
env_file:
- .env
environment:
REDIS_HOST: db
MQTT_HOST: mqtt-broker
DSG_URL: "http://dsg-web:8080"
DSG_BROKER_HOST: mqtt-broker
HEURISTIC_LIB_SERVER_URL: "https://heuristic-web:5001"
Kestrel__Certificates__Default__Path: /certs/localhost.pfx
depends_on:
cert-init:
condition: service_completed_successfully
db:
condition: service_started
mqtt-broker:
condition: service_started
dsg-web:
condition: service_started
heuristic-web:
condition: service_started
networks:
- aisra-net
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
environment:
PUBLIC_API_URL: "${PUBLIC_API_URL}"
PORT: "${FRONTEND_PORT}"
ports:
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
depends_on:
- aisra-web
networks:
aisra-net:
driver: bridge