-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (59 loc) · 1.53 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
48
49
50
51
52
53
54
55
56
57
58
59
services:
database:
image: pgvector/pgvector:pg16
restart: always
expose:
- 5432
ports:
- "5432:5432"
volumes:
- dbdata:/var/lib/postgresql/data
- ./../quiz_service/pg-init-scripts:/docker-entrypoint-initdb.d
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_CREATE_DB_QUIZ_SERVICE=quiz_service
app-quiz:
build:
context: ./../quiz_service # necessary because otherwise docker-compose overrides the context path when merging multiple docker-compose.yml files
dockerfile: Dockerfile
restart: always
container_name: quiz_service
expose:
- 9000
- 9001
ports:
- "9000:9000"
- "9001:9001"
depends_on:
- database
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://database:5432/quiz_service
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: root
dapr-quiz:
image: "daprio/daprd"
command: [
"./daprd",
"--app-id", "quiz_service",
"--app-port", "9001",
"--dapr-http-port", "9000",
"--resources-path", "./components"
]
volumes:
- "./../quiz_service/components/:/components" # Mount our components folder for the runtime to use. The mounted location must match the --resources-path argument.
depends_on:
- app-quiz
- redis
network_mode: "service:app-quiz"
redis:
image: "redis:alpine"
expose:
- "6379"
volumes:
dbdata:
testdata:
networks:
default:
name: dapr-network
external: true