Compare commits
2 commits
ac91526bc6
...
7fa2ff3b64
Author | SHA1 | Date | |
---|---|---|---|
Seiwy | 7fa2ff3b64 | ||
hirst | 95d0fc9b22 |
|
@ -1,3 +1,5 @@
|
||||||
|
|
||||||
|
|
||||||
version: "3"
|
version: "3"
|
||||||
# https://scribe.rip/@kadampritesh46/microservices-part-4-dockerization-and-beyond-55693a2419e7
|
# https://scribe.rip/@kadampritesh46/microservices-part-4-dockerization-and-beyond-55693a2419e7
|
||||||
networks:
|
networks:
|
||||||
|
@ -12,10 +14,7 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- learningpulse
|
- learningpulse
|
||||||
environment:
|
environment:
|
||||||
- spring.application.name=eureka-server
|
- SPRING_PROFILES_ACTIVE=docker
|
||||||
- eureka.client.registerWithEureka=false
|
|
||||||
- eureka.client.fetchRegistry=false
|
|
||||||
- eureka.server.waitTimeInMsWhenSyncEmpty=0
|
|
||||||
|
|
||||||
# to test
|
# to test
|
||||||
# curl http://admin:admin@localhost:8181/api/v1/dummy/test -v;
|
# curl http://admin:admin@localhost:8181/api/v1/dummy/test -v;
|
||||||
|
@ -27,8 +26,7 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- learningpulse
|
- learningpulse
|
||||||
environment:
|
environment:
|
||||||
- eureka.client.service-url.defaultZone=http://eureka-server:8761/eureka
|
- SPRING_PROFILES_ACTIVE=docker
|
||||||
- eureka.instance.preferIpAddress=true
|
|
||||||
|
|
||||||
gateway:
|
gateway:
|
||||||
image: git.4o1x5.dev/learningpulse/server/gateway:dev
|
image: git.4o1x5.dev/learningpulse/server/gateway:dev
|
||||||
|
@ -41,8 +39,7 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- learningpulse
|
- learningpulse
|
||||||
environment:
|
environment:
|
||||||
- eureka.instance.preferIpAddress=true
|
- SPRING_PROFILES_ACTIVE=docker
|
||||||
- eureka.client.service-url.defaultZone=http://eureka-server:8761/eureka
|
|
||||||
#
|
#
|
||||||
# TODO once implemented into gateway
|
# TODO once implemented into gateway
|
||||||
# keycloak:
|
# keycloak:
|
||||||
|
|
|
@ -1,2 +1,9 @@
|
||||||
app:
|
app:
|
||||||
eureka-server: eureka
|
eureka: eureka-server
|
||||||
|
|
||||||
|
eureka:
|
||||||
|
instance:
|
||||||
|
prefer-ip-address: true
|
||||||
|
client:
|
||||||
|
service-url:
|
||||||
|
defaultZone: http://${app.eureka}:8761/eureka
|
|
@ -27,9 +27,7 @@ management:
|
||||||
eureka:
|
eureka:
|
||||||
client:
|
client:
|
||||||
service-url:
|
service-url:
|
||||||
#defaultZone: http://localhost:8761/eureka
|
defaultZone: http://localhost:8761/eureka
|
||||||
# Will only work when docker is used
|
|
||||||
defaultZone: http://eureka-server:8761/eureka
|
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
|
|
9
eureka/src/main/resources/application-docker.yml
Normal file
9
eureka/src/main/resources/application-docker.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: eureka-server
|
||||||
|
eureka:
|
||||||
|
client:
|
||||||
|
register-with-eureka: false
|
||||||
|
fetch-registry: false
|
||||||
|
server:
|
||||||
|
wait-time-in-ms-when-sync-empty: 0
|
|
@ -1,2 +1,9 @@
|
||||||
app:
|
app:
|
||||||
eureka-server: eureka
|
eureka-server: eureka
|
||||||
|
|
||||||
|
eureka:
|
||||||
|
instance:
|
||||||
|
prefer-ip-address: true
|
||||||
|
client:
|
||||||
|
service-url:
|
||||||
|
defaultZone: http://${app.eureka-server}:8761/eureka
|
Reference in a new issue