This file contains 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
version: '3.9' | |
services: | |
order-postgres: | |
image: postgres:13 | |
container_name: order-postgres | |
ports: | |
- "5432:5432" | |
volumes: | |
- ./db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d |
This file contains 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
seller-api-wiremock: | |
image: wiremock/wiremock | |
container_name: seller-wiremock | |
ports: | |
- "8085:8080" | |
volumes: | |
- ./wiremock/seller-api:/home/wiremock | |
healthcheck: | |
test: curl --fail -s http://localhost:8085/__admin/ || exit 1 | |
interval: 2s |
This file contains 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
order-redis: | |
image: redis:latest | |
container_name: order-redis | |
command: redis-server --requirepass redis-pass --appendonly yes | |
ports: | |
- "6379:6379" | |
healthcheck: | |
test: ["CMD", "redis-cli","ping"] | |
interval: 2s | |
timeout: 3s |
This file contains 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
order-postgres: | |
image: postgres:13 | |
container_name: order-postgres | |
ports: | |
- "5432:5432" | |
volumes: | |
- ./db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d | |
environment: | |
- POSTGRES_USER=order_api | |
- POSTGRES_PASSWORD=123 |
This file contains 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
order-zookeeper: | |
image: wurstmeister/zookeeper | |
container_name: order-zookeeper | |
ports: | |
- "2181:2181" | |
order-kafka: | |
image: wurstmeister/kafka | |
container_name: order-kafka | |
ports: | |
- "9092:9092" |
This file contains 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: 9090 | |
say-hi: | |
ribbon: | |
eureka: | |
enabled: false | |
listOfServers: localhost:8080,localhost:8081 | |
ServerListRefreshInterval: 15000 |
This file contains 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.example.ribbon.client; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.cloud.client.loadbalancer.LoadBalanced; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
import org.springframework.web.client.RestTemplate; |
This file contains 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 https://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.2.7.RELEASE</version> | |
<relativePath/> <!-- lookup parent from repository --> | |
</parent> |
This file contains 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:8080} |
This file contains 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.example.demo; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.core.env.Environment; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@SpringBootApplication |
NewerOlder