File tree 5 files changed +23
-9
lines changed
5 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,6 @@ test/tracetesting/tracetesting-vars.yaml
44
44
/src /accounting /src /protos /
45
45
/src /cart /src /protos /
46
46
/src /fraud-detection /src /main /proto
47
- /src /frontend /pb /
48
- /src /frontend /protos /
49
47
/src /payment /demo.proto
50
48
/src /shipping /proto /
51
49
/src /currency /proto
Original file line number Diff line number Diff line change @@ -30,14 +30,20 @@ gen_proto_python() {
30
30
python -m grpc_tools.protoc -I /build/pb/ --python_out=" ./src/$1 /" --grpc_python_out=" ./src/$1 /" /build/pb/demo.proto
31
31
}
32
32
33
+ gen_proto_ts () {
34
+ echo " Generating Typescript protobuf files for $1 "
35
+ docker build -f " src/$1 /genproto/Dockerfile" -t " $1 -genproto" .
36
+ docker run --rm -v $( pwd) :/build " $1 -genproto"
37
+ }
38
+
33
39
if [ -z " $1 " ]; then
34
40
# gen_proto_dotnet accounting
35
41
# gen_proto_java ad
36
42
# gen_proto_dotnet cart
37
43
gen_proto_go checkout
38
44
gen_proto_cpp currency
39
45
# gen_proto_ruby email
40
- # gen_proto_ts frontend
46
+ gen_proto_ts frontend
41
47
# gen_proto_js payment
42
48
gen_proto_go product-catalog
43
49
# gen_proto_php quote
Original file line number Diff line number Diff line change 1
1
# Copyright The OpenTelemetry Authors
2
2
# SPDX-License-Identifier: Apache-2.0
3
3
4
-
5
4
FROM node:20-alpine AS deps
6
5
RUN apk add --no-cache libc6-compat
7
6
@@ -11,18 +10,16 @@ COPY ./src/frontend/package*.json ./
11
10
RUN npm ci
12
11
13
12
FROM node:20-alpine AS builder
14
- RUN apk add --no-cache libc6-compat protobuf-dev protoc
13
+ RUN apk add --no-cache libc6-compat
15
14
WORKDIR /app
16
15
COPY --from=deps /app/node_modules ./node_modules
17
- COPY ./pb ./pb
16
+ COPY ./src/frontend/protos ./protos
18
17
COPY ./src/frontend .
19
18
20
- RUN npm run grpc:generate
21
19
RUN npm run build
22
20
23
21
FROM node:20-alpine AS runner
24
22
WORKDIR /app
25
- RUN apk add --no-cache protobuf-dev protoc
26
23
27
24
ENV NODE_ENV=production
28
25
Original file line number Diff line number Diff line change
1
+ # Copyright The OpenTelemetry Authors
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ FROM node:20-alpine
5
+
6
+ WORKDIR /build
7
+
8
+ RUN apk add --no-cache libc6-compat protobuf-dev protoc
9
+
10
+ COPY ./src/frontend/package*.json ./
11
+ RUN npm ci
12
+
13
+ CMD ["npm" , "run" , "grpc:generate" ]
Original file line number Diff line number Diff line change 3
3
"version" : " 0.1.0" ,
4
4
"private" : true ,
5
5
"scripts" : {
6
- "dev" : " npm run grpc:generate && NODE_OPTIONS='-r ./utils/telemetry/Instrumentation.js' next dev" ,
6
+ "dev" : " NODE_OPTIONS='-r ./utils/telemetry/Instrumentation.js' next dev" ,
7
7
"build" : " next build" ,
8
8
"start" : " node --require ./Instrumentation.js server.js" ,
9
9
"lint" : " next lint" ,
You can’t perform that action at this time.
0 commit comments