This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
port: ${PORT:8761} # Indicate the default PORT where this service will be started | |
eureka: | |
client: | |
registerWithEureka: false #telling the server not to register himself in the service registry | |
fetchRegistry: false | |
server: | |
waitTimeInMsWhenSyncEmpty: 0 #wait time for subsequent sync |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# grab the base image | |
FROM openjdk:8-jdk-alpine | |
# install curl | |
RUN apk add --update \ | |
curl \ | |
&& rm -rf /var/cache/apk/* | |
# create a working volume in tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## docker-compose -f ./dc-01-discovery.yml up -d | |
version: "3.7" | |
services: | |
################ | |
# Elastisearch # https://geowarin.com/spring-boot-logs-in-elastic-search-with-fluentd/ | |
################ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-parent</artifactId> | |
<version>2.1.7.RELEASE</version> | |
<relativePath/> <!-- lookup parent from repository --> | |
</parent> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.thinkmicroservices.ri.spring.web; | |
import javax.annotation.PostConstruct; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | |
@EnableDiscoveryClient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.thinkmicroservices.ri.spring.web; | |
import javax.annotation.PostConstruct; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | |
@EnableDiscoveryClient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
application: | |
name: CONTENT-SERVICE | |
cloud: | |
config: | |
fail-fast: true | |
retry: | |
max-attempts: 10 | |
initial-interval: 1500 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
port: 4040 | |
error: | |
whitelabel: | |
enabled: false | |
eureka: | |
client: | |
serviceURL: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# grab the base image | |
FROM openjdk:8-jdk-alpine | |
# install curl | |
RUN apk add --update \ | |
curl \ | |
&& rm -rf /var/cache/apk/* | |
# create a working volume in tmp | |
VOLUME /tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## docker-compose -f ./dc-03-content.yml up -d | |
version: "3.7" | |
services: | |
################ | |
# Elastisearch # https://geowarin.com/spring-boot-logs-in-elastic-search-with-fluentd/ | |
################ |