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