generated from IT-REX-Platform/template-microservice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
88 lines (88 loc) · 2.34 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
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
version: "3"
services:
minio:
image: quay.io/minio/minio:latest
command: server --console-address ":3011" /miniodata
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
hostname: minio
volumes:
- miniodata:/data
nginx-media:
image: nginx:1.24-alpine
hostname: nginx
volumes:
# ../media_service is necessary because otherwise docker-compose overrides the context when merging multiple docker-compose.yml files
- ./../media_service/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "3010:9000"
- "3011:9090"
depends_on:
- minio
database-media:
image: postgres:alpine
restart: always
expose:
- 3032
ports:
- "3032:5432"
volumes:
- mediadata:/var/lib/postgresql/data
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=media_service
app-media:
build:
context: ./../media_service/ # necessary because otherwise docker-compose overrides the context when merging multiple docker-compose.yml files
restart: always
container_name: media_service
expose:
- 3000
- 3001
ports:
- "3000:3000"
- "3001:3001"
depends_on:
- database-media
- minio
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://database-media:5432/media_service
MINIO_URL: http://host.docker.internal:3010
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: root
MINIO_ACCESS_KEY: minioadmin
MINIO_ACCESS_SECRET: minioadmin
dapr-media:
image: "daprio/daprd"
command: [
"./daprd",
"--app-id", "media_service",
"--app-port", "3001",
"--dapr-http-port", "3000",
"--resources-path", "./components"
]
volumes:
- "./../media_service/components/:/components" # Mount our components folder for the runtime to use. The mounted location must match the --resources-path argument.
depends_on:
- app-media
- redis
network_mode: "service:app-media"
redis:
image: "redis:alpine"
expose:
- "6379"
volumes:
miniodata:
mediadata:
testdata:
networks:
default:
name: dapr-network
external: true