-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy-company-api-gateway-backingservice.yml
113 lines (97 loc) · 3.24 KB
/
my-company-api-gateway-backingservice.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
## Info endpoint
info:
app:
name: API Gateway
# Define the port where the API gateway server would be running
server:
port: ${PORT:9000}
# The OAuth2 server definition that would be used to send the authorization requests to
authserver:
hostname: localhost
port: 9999
contextPath: uaa
# Define the routes which determine what URL are serviced by what applications.
# The application/services are defined in the bootstrap.yml file of individual applications
# using the spring.application.name property.
zuul:
routes:
my-company-blog-domain-microservice:
path: /command/blog/**
my-company-blog-materialized-view-microservice:
path: /query/blog/**
my-company-project-domain-microservice:
path: /command/project/**
my-company-project-materialized-view-microservice:
path: /query/project/**
# Define the Eureka server that handles service registration
eureka:
client:
serviceUrl:
defaultZone: ${vcap.services.my-company-registry-backingservice.credentials.uri:http://localhost:8761}/eureka/
axon:
eventhandling:
processors:
default:
source: messageSourceApiGateway
spring:
application:
queue: gateway.event.stream
blog:
exchange: blog.events.fanout.exchange
project:
exchange: project.events.fanout.exchange
rabbitmq:
hostname: 127.0.0.1
username: guest
password: guest
oauth2:
sso:
home:
secure: false
path: /,/**/*.html
client:
accessTokenUri: http://${authserver.hostname}:${authserver.port}/${authserver.contextPath}/oauth/token
userAuthorizationUri: http://${authserver.hostname}:${authserver.port}/${authserver.contextPath}/oauth/authorize
clientId: acme
clientSecret: acmesecret
resource:
jwt:
keyUri: http://${authserver.hostname}:${authserver.port}/${authserver.contextPath}/oauth/token_key
keyValue: |
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnGp/Q5lh0P8nPL21oMMrt2RrkT9AW5jgYwLfSUnJVc9G6uR3cXRRDCjHqWU5WYwivcF180A6CWp/ireQFFBNowgc5XaA0kPpzEtgsA5YsNX7iSnUibB004iBTfU9hZ2Rbsc8cWqynT0RyN4TP1RYVSeVKvMQk4GT1r7JCEC+TNu1ELmbNwMQyzKjsfBXyIOCFU/E94ktvsTZUHF4Oq44DBylCDsS1k7/sfZC2G5EU7Oz0mhG8+Uz6MSEQHtoIi6mc8u64Rwi3Z3tscuWG2ShtsUFuNSAFNkY7LkLn+/hxLCu2bNISMaESa8dG22CIMuIeRLVcAmEWEWH5EEforTg+QIDAQAB
-----END PUBLIC KEY-----
---
spring:
profiles: docker
rabbitmq:
hostname: my-rabbit
username: test
password: password
data:
mongodb:
uri: mongodb://my-mongo:27017/blogposts
eureka:
# Register our microservices to Eureka using hostnames in a Docker environment will not work, they will all get
# one and the same hostname. Instead we configure them to use its IP address during registration with Eureka.
instance:
preferIpAddress: true
client:
serviceUrl:
defaultZone: http://registry:8761/eureka/
# The OAuth2 server definition that would be used to send the authorization requests to
authserver:
hostname: authserver
port: 9999
contextPath: uaa
---
spring:
profiles: cloud
#authserver:
# hostname: ${vcap.services.authserver.credentials.uri}
# port: 80
# contextPath: uaa
eureka:
instance:
hostname: ${vcap.application.uris[0]}
nonSecurePort: 80