-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (59 loc) · 1.56 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
- ./../content_service/pg-init-scripts:/docker-entrypoint-initdb.d
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_CREATE_DB_CONTENT_SERVICE=content_service
app-content:
build:
context: ./../content_service/ # necessary because otherwise docker-compose overrides the context when merging multiple docker-compose.yml files
dockerfile: Dockerfile
restart: always
container_name: content_service
expose:
- 4000
- 4001
ports:
- "4000:4000"
- "4001:4001"
depends_on:
- database
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://database:5432/content_service
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: root
dapr-content:
image: "daprio/daprd"
command: [
"./daprd",
"--app-id", "content_service",
"--app-port", "4001",
"--dapr-http-port", "4000",
"--resources-path", "./components"
]
volumes:
- "./../content_service/components/:/components" # Mount our components folder for the runtime to use. The mounted location must match the --resources-path argument.
depends_on:
- app-content
- redis
network_mode: "service:app-content"
redis:
image: "redis:alpine"
expose:
- "6379"
volumes:
dbdata:
testdata:
networks:
default:
name: dapr-network
external: true