generated from IT-REX-Platform/template-microservice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (57 loc) · 1.52 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
version: "3"
services:
database-skilllevel:
image: postgres:alpine
restart: always
expose:
- 8032
ports:
- "8032:5432"
volumes:
- skillleveldata:/var/lib/postgresql/data
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=skilllevel_service
app-skilllevel:
build:
context: ./../skilllevel_service # necessary because otherwise docker-compose overrides the context path when merging multiple docker-compose.yml files
dockerfile: Dockerfile
restart: always
ports:
- "8000:8000"
- "8001:8001"
depends_on:
- database-skilllevel
links:
- database-skilllevel
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://database-skilllevel:5432/skilllevel_service
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: root
dapr-skilllevel:
image: "daprio/daprd"
command: [
"./daprd",
"--app-id", "skilllevel_service",
"--app-port", "8001",
"--dapr-http-port", "8000",
"--resources-path", "./components"
]
volumes:
- "./../skilllevel_service/components/:/components" # Mount our components folder for the runtime to use. The mounted location must match the --resources-path argument.
depends_on:
- app-skilllevel
- redis
network_mode: "service:app-skilllevel"
redis:
image: "redis:alpine"
expose:
- "6379"
volumes:
skillleveldata:
testdata:
networks:
default:
name: dapr-network
external: true