Skip to content

Commit c79cd6c

Browse files
committed
url клиентов, имя, порт и автоудаление контейнера
1 parent 6f50ce6 commit c79cd6c

10 files changed

Lines changed: 13 additions & 13 deletions

File tree

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ jobs:
9191
host: 62.109.17.193
9292
username: teamtwo
9393
password: teamtwo
94-
script: docker run teamtwo/website:latest -name teamtwo_website &
94+
script: docker run -d -p 8080:8080 --rm --name teamtwo_website teamtwo/website
9595

9696
- name: SSH Run Docker Telegrambot
9797
uses: appleboy/ssh-action@master
9898
with:
9999
host: 62.109.17.193
100100
username: teamtwo
101101
password: teamtwo
102-
script: docker run teamtwo/telegrambot:latest -name teamtwo_telegrambot &
102+
script: docker run -d -p 8080:8080 --rm --name teamtwo_telegrambot teamtwo/telegrambot &
103103

telegrambot/src/main/java/ru/teamtwo/telegrambot/client/MarketplaceClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import java.util.List;
99

10-
@FeignClient(url = "localhost:8081/marketplace/api/product-offers", name="productOffers")
10+
@FeignClient(url = "${telegrambot.rest.webClientUri}/marketplace/api/product-offers", name="productOffers")
1111
public interface MarketplaceClient {
1212
@GetMapping("")
1313
List<ProductDTO> getProductOffersByProductName(@RequestParam(value = "filter", required = true) String filter,

telegrambot/src/main/java/ru/teamtwo/telegrambot/client/ProductOfferClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import org.springframework.web.bind.annotation.PathVariable;
66
import ru.teamtwo.core.dtos.ProductDTO;
77

8-
@FeignClient(url = "localhost:8081/marketplace/api/product_offer", name="productOffer")
8+
@FeignClient(url = "${telegrambot.rest.webClientUri}/marketplace/api/product_offer", name="productOffer")
99
public interface ProductOfferClient {
1010
@GetMapping("{id}")
1111
ProductDTO get(@PathVariable Integer id);

telegrambot/src/main/java/ru/teamtwo/telegrambot/client/customer/CartItemClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import ru.teamtwo.core.dtos.customer.CartItemArrayDto;
1111
import ru.teamtwo.core.dtos.customer.CartItemDto;
1212

13-
@FeignClient(url = "localhost:8081/marketplace/api/cart_item", name="cartItem")
13+
@FeignClient(url = "${telegrambot.rest.webClientUri}/marketplace/api/cart_item", name="cartItem")
1414
public interface CartItemClient {
1515
@GetMapping("{id}")
1616
CartItemDto get(@PathVariable Integer id);

telegrambot/src/main/java/ru/teamtwo/telegrambot/client/customer/CustomerClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import org.springframework.web.bind.annotation.ResponseBody;
1010
import ru.teamtwo.core.dtos.customer.CustomerDto;
1111

12-
@FeignClient(url = "localhost:8081/marketplace/api/customer", name="customer")
12+
@FeignClient(url = "${telegrambot.rest.webClientUri}/marketplace/api/customer", name="customer")
1313
public interface CustomerClient {
1414
@GetMapping("{id}")
1515
CustomerDto get(@PathVariable Integer id);;

telegrambot/src/main/java/ru/teamtwo/telegrambot/client/customer/OrderClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import org.springframework.web.bind.annotation.ResponseBody;
1010
import ru.teamtwo.core.dtos.customer.OrderDto;
1111

12-
@FeignClient(url = "localhost:8081/marketplace/api/order", name="order")
12+
@FeignClient(url = "${telegrambot.rest.webClientUri}/marketplace/api/order", name="order")
1313
public interface OrderClient {
1414
@GetMapping("{id}")
1515
OrderDto get(@PathVariable Integer id);

telegrambot/src/main/java/ru/teamtwo/telegrambot/client/customer/OrderItemClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import org.springframework.web.bind.annotation.ResponseBody;
1010
import ru.teamtwo.core.dtos.customer.OrderItemDto;
1111

12-
@FeignClient(url = "localhost:8081/marketplace/api/order_item", name="orderItem")
12+
@FeignClient(url = "${telegrambot.rest.webClientUri}/marketplace/api/order_item", name="orderItem")
1313
public interface OrderItemClient {
1414
@GetMapping("{id}")
1515
OrderItemDto get(@PathVariable Integer id);

telegrambot/src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
telegrambot.rest.webClientUri=http://localhost:8081/marketplace/api
1+
telegrambot.rest.webClientUri=62.109.17.193:8080
22
telegrambot.customerState.defaultLimit=5
33
telegrambot.customerState.defaultOffset=0
44
spring.main.banner-mode=off

telegrambot/src/main/resources/logback.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
55
<encoder>
6-
<pattern>%d{mm:ss.SSS} %-5level %logger{20} - %msg%n</pattern>
6+
<pattern>%d{hh:mm:ss.SSS} %-5level %logger{20} - %msg%n</pattern>
77
</encoder>
88
</appender>
99

@@ -17,7 +17,7 @@
1717

1818
<appender name="LOGASPECT" class="ch.qos.logback.core.ConsoleAppender">
1919
<encoder>
20-
<pattern>%d{mm:ss.S} %msg%n</pattern>
20+
<pattern>%d{hh:mm:ss.SSS} %msg%n</pattern>
2121
</encoder>
2222
</appender>
2323

website/src/main/resources/logback.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
55
<encoder>
6-
<pattern>%d{mm:ss.SSS} %-5level %logger{20} - %msg%n</pattern>
6+
<pattern>%d{hh:mm:ss.SSS} %-5level %logger{20} - %msg%n</pattern>
77
</encoder>
88
</appender>
99

@@ -17,7 +17,7 @@
1717

1818
<appender name="LOGASPECT" class="ch.qos.logback.core.ConsoleAppender">
1919
<encoder>
20-
<pattern>%d{mm:ss.S} %msg%n</pattern>
20+
<pattern>%d{hh:mm:ss.SSS} %msg%n</pattern>
2121
</encoder>
2222
</appender>
2323

0 commit comments

Comments
 (0)