Skip to content

Commit b0d41f9

Browse files
committed
frontend dockerfile and build added
1 parent 75c62e5 commit b0d41f9

File tree

15 files changed

+24
-11
lines changed

15 files changed

+24
-11
lines changed

microservices-frontend/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.angular
2+
dist
3+
node_modules

microservices-frontend/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:22 AS build
2+
3+
WORKDIR /app
4+
COPY package*.json ./
5+
RUN npm install
6+
COPY . .
7+
RUN npm run build
8+
9+
FROM nginx:alpine
10+
COPY --from=build /app/dist/microservices-frontend/browser /usr/share/nginx/html
11+
12+

order-service/src/main/java/com/nipundas/microservices/order/config/RestClientConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@RequiredArgsConstructor
2020
public class RestClientConfig {
2121

22-
@Value("${inventory.url}")
22+
@Value("${inventory.service.url}")
2323
private String inventoryServiceUrl;
2424

2525
private final ObservationRegistry observationRegistry;

order-service/src/main/resources/application.properties

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ spring.jpa.hibernate.ddl-auto=none
66
server.port=8081
77
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
88
spring.flyway.baselineOnMigrate = true
9-
inventory.url=http://localhost:8082
9+
inventory.service.url=http://localhost:8082
1010

1111
springdoc.swagger-ui.path=/swagger-ui.html
1212
springdoc.api-docs.path=/api-docs
@@ -47,9 +47,6 @@ spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.Strin
4747
spring.kafka.producer.value-serializer=io.confluent.kafka.serializers.KafkaAvroSerializer
4848
spring.kafka.producer.properties.schema.registry.url=http://localhost:8085
4949

50-
51-
52-
5350
management.metrics.distribution.percentiles-histogram.http.server.requests=true
5451
management.observations.key-values.application=product-service
5552

order-service/target/classes/application.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ spring.jpa.hibernate.ddl-auto=none
66
server.port=8081
77
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
88
spring.flyway.baselineOnMigrate = true
9-
inventory.url=http://localhost:8082
9+
inventory.service.url=http://localhost:8082
1010

1111
springdoc.swagger-ui.path=/swagger-ui.html
1212
springdoc.api-docs.path=/api-docs
@@ -47,10 +47,10 @@ spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.Strin
4747
spring.kafka.producer.value-serializer=io.confluent.kafka.serializers.KafkaAvroSerializer
4848
spring.kafka.producer.properties.schema.registry.url=http://localhost:8085
4949

50-
51-
52-
5350
management.metrics.distribution.percentiles-histogram.http.server.requests=true
5451
management.observations.key-values.application=product-service
5552

56-
management.tracing.sampling.probability=1.0
53+
management.tracing.sampling.probability=1.0
54+
55+
56+
loki.url=http://localhost:3100/loki/api/v1/push

order-service/target/classes/logback-spring.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
<configuration>
33
<include resource="org/springframework/boot/logging/logback/base.xml"/>
44
<springProperty scope="context" name="appName" source="spring.application.name"/>
5+
<springProperty scope="context" name="lokiUrl" source="loki.url"/>
56

67
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender">
78
<http>
8-
<url>http://localhost:3100/loki/api/v1/push</url>
9+
<url>${lokiUrl}</url>
910
</http>
1011
<format>
1112
<label>
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)