forked from rohitghatol/sample-config
-
Notifications
You must be signed in to change notification settings - Fork 86
/
task-webservice.yml
48 lines (42 loc) · 1.54 KB
/
task-webservice.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
server:
port: 8082
eureka:
client:
serviceUrl:
defaultZone: http://localhost:8761/eureka/
# The OAuth2 server definition that would be used to send the authorization requests to
authserver:
hostname: localhost
port: 8899
contextPath: userauth
# Note that the "/user" endpoint needs to provide the principle of the logged in user (/me endpoint)
spring:
oauth2:
resource:
userInfoUri: http://${authserver.hostname}:${authserver.port}/${authserver.contextPath}/me
preferTokenInfo: false
client:
accessTokenUri: http://${authserver.hostname}:${authserver.port}/${authserver.contextPath}/oauth/token
userAuthorizationUri: http://${authserver.hostname}:${authserver.port}/${authserver.contextPath}/oauth/authorize
clientId: client
---
# task-webservice instance when used on Docker
spring:
profiles: docker
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://192.168.59.103:8761/eureka/
# The OAuth2 server definition that would be used to send the authorization requests to
authserver:
hostname: 192.168.59.103
port: 8899
contextPath: userauth
# Define the port where the API gateway server would be running. This could always be port 8080
# since each docker container has it's own IP
server:
port: 8080