forked from ThomasVitale/cloud-native-spring-in-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
114 lines (104 loc) 路 3.3 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
version: "3.8"
services:
# Applications
catalog-service:
depends_on:
- polar-postgres
image: "catalog-service"
container_name: "catalog-service"
ports:
- 9001:9001
- 8001:8001
environment:
# Buildpacks environment variable to configure the number of threads in memory calculation
- BPL_JVM_THREAD_COUNT=50
# Buildpacks environment variable to enable debug through a socket on port 8001
- BPL_DEBUG_ENABLED=true
- BPL_DEBUG_PORT=8001
- SPRING_CLOUD_CONFIG_URI=http://config-service:8888
- SPRING_DATASOURCE_URL=jdbc:postgresql://polar-postgres:5432/polardb_catalog
- SPRING_PROFILES_ACTIVE=testdata
order-service:
depends_on:
- polar-postgres
- polar-rabbitmq
image: "order-service"
container_name: "order-service"
ports:
- 9002:9002
- 8002:8002
environment:
# Buildpacks environment variable to enable debug through a socket on port 8002
- BPL_DEBUG_ENABLED=true
- BPL_DEBUG_PORT=8002
- POLAR_CATALOG_SERVICE_URI=http://catalog-service:9001
- SPRING_CLOUD_CONFIG_URI=http://config-service:8888
- SPRING_R2DBC_URL=r2dbc:postgresql://polar-postgres:5432/polardb_order
- SPRING_FLYWAY_URL=jdbc:postgresql://polar-postgres:5432/polardb_order
- SPRING_RABBITMQ_HOST=polar-rabbitmq
dispatcher-service:
depends_on:
- polar-rabbitmq
image: "dispatcher-service"
container_name: dispatcher-service
ports:
- 9003:9003
- 8003:8003
environment:
# Buildpacks environment variable to enable debug through a socket on port 8002
- BPL_DEBUG_ENABLED=true
- BPL_DEBUG_PORT=8003
- SPRING_CLOUD_CONFIG_URI=http://config-service:8888
- SPRING_RABBITMQ_HOST=polar-rabbitmq
edge-service:
depends_on:
- polar-redis
image: "edge-service"
container_name: "edge-service"
ports:
- 9000:9000
- 8000:8000
environment:
# Buildpacks environment variable to enable debug through a socket on port 8000
- BPL_DEBUG_ENABLED=true
- BPL_DEBUG_PORT=8000
- CATALOG_SERVICE_URL=http://catalog-service:9001
- ORDER_SERVICE_URL=http://order-service:9002
- SPRING_CLOUD_CONFIG_URI=http://config-service:8888
- SPRING_REDIS_HOST=polar-redis
config-service:
image: "config-service"
container_name: "config-service"
ports:
- 8888:8888
- 9888:9888
environment:
# Buildpacks environment variable to configure the number of threads in memory calculation
- BPL_JVM_THREAD_COUNT=50
# Buildpacks environment variable to enable debug through a socket on port 9888
- BPL_DEBUG_ENABLED=true
- BPL_DEBUG_PORT=9888
# Backing Services
polar-postgres:
image: "postgres:14.12"
container_name: "polar-postgres"
ports:
- 5432:5432
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
volumes:
- ./postgresql/init.sql:/docker-entrypoint-initdb.d/init.sql
polar-redis:
image: "redis:7.2"
container_name: "polar-redis"
ports:
- 6379:6379
polar-rabbitmq:
image: rabbitmq:3.13-management
container_name: polar-rabbitmq
ports:
- 5672:5672
- 15672:15672
volumes:
- ./rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf