File tree Expand file tree Collapse file tree 7 files changed +29
-19
lines changed Expand file tree Collapse file tree 7 files changed +29
-19
lines changed Original file line number Diff line number Diff line change @@ -47,20 +47,20 @@ services:
47
47
build :
48
48
context : ./frontend # Path to the folder containing Dockerfile
49
49
dockerfile : Dockerfile
50
+ args :
51
+ BILLING_SIGNALR : localhost:5002
52
+ CLIENT_SIGNALR : localhost:5004
53
+ SALES_SIGNALR : localhost:5001
54
+ SHIPPING_SIGNALR : localhost:5003
50
55
ports :
51
- - " 61335:80"
56
+ - 61335:80
52
57
depends_on :
53
58
- billing
54
59
- shipping
55
60
- clientui
56
61
- sales
57
62
volumes :
58
63
- ./frontend:/app # Optional for hot reloading
59
- environment :
60
- - BILLING_SIGNALR=billing:5002
61
- - CLIENT_SIGNALR=clientui:5000
62
- - SALES_SIGNALR=sales:5001
63
- - SHIPPING_SIGNALR=shipping:5003
64
64
billing :
65
65
build :
66
66
context : ./
@@ -73,6 +73,8 @@ services:
73
73
- ORIGIN_URL=http://frontend:8080
74
74
- TRANSPORT_TYPE
75
75
- CONNECTION_STRING
76
+ depends_on :
77
+ - service-control
76
78
shipping :
77
79
build :
78
80
context : ./
@@ -85,6 +87,8 @@ services:
85
87
- ORIGIN_URL=http://frontend:8080
86
88
- TRANSPORT_TYPE
87
89
- CONNECTION_STRING
90
+ depends_on :
91
+ - service-control
88
92
sales :
89
93
build :
90
94
context : ./
@@ -97,18 +101,22 @@ services:
97
101
- ORIGIN_URL=http://frontend:8080
98
102
- TRANSPORT_TYPE
99
103
- CONNECTION_STRING
104
+ depends_on :
105
+ - service-control
100
106
clientui :
101
107
build :
102
108
context : ./
103
109
dockerfile : ./ClientUI/Dockerfile
104
110
container_name : clientui
105
111
ports :
106
- - " 5000 :80"
112
+ - " 5004 :80"
107
113
environment :
108
114
- LISTENING_PORT=80
109
115
- ORIGIN_URL=http://frontend:8080
110
116
- TRANSPORT_TYPE
111
117
- CONNECTION_STRING
118
+ depends_on :
119
+ - service-control
112
120
113
121
volumes :
114
122
sc-data:
Original file line number Diff line number Diff line change @@ -13,6 +13,16 @@ RUN npm install
13
13
# Copy the rest of the application code
14
14
COPY . .
15
15
16
+ ARG BILLING_SIGNALR
17
+ ARG CLIENT_SIGNALR
18
+ ARG SALES_SIGNALR
19
+ ARG SHIPPING_SIGNALR
20
+
21
+ ENV VITE_CLIENT_SIGNALR=$CLIENT_SIGNALR
22
+ ENV VITE_BILLING_SIGNALR=$BILLING_SIGNALR
23
+ ENV VITE_SALES_SIGNALR=$SALES_SIGNALR
24
+ ENV VITE_SHIPPING_SIGNALR=$SHIPPING_SIGNALR
25
+
16
26
# Build the application
17
27
RUN npm run build
18
28
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import { store } from "./shared";
14
14
import MessageContainer from " ./MessageContainer.vue" ;
15
15
import { GA4 } from " ../utils/analytics" ;
16
16
17
- const {connection, state} = useSignalR (` http://${import .meta .env .BILLING_SIGNALR ?? " localhost:5002" }/billingHub ` );
17
+ const {connection, state} = useSignalR (` http://${import .meta .env .VITE_BILLING_SIGNALR ?? " localhost:5002" }/billingHub ` );
18
18
19
19
const processedCount = ref (0 );
20
20
const erroredCount = ref (0 );
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { store } from "./shared";
7
7
import type { PlaceOrder , Message } from " ./types" ;
8
8
import MessageContainer from " ./MessageContainer.vue" ;
9
9
10
- const { connection, state } = useSignalR (` http://${import .meta .env .CLIENT_SIGNALR ?? " localhost:5000" }/clientHub ` );
10
+ const { connection, state } = useSignalR (` http://${import .meta .env .VITE_CLIENT_SIGNALR ?? " localhost:5000" }/clientHub ` );
11
11
12
12
const orderCount = ref (0 );
13
13
const messages = ref <Message []>([]);
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import MessageContainer from "./MessageContainer.vue";
14
14
import { store } from " ./shared" ;
15
15
import { GA4 } from " ../utils/analytics" ;
16
16
17
- const { connection, state } = useSignalR (` http://${import .meta .env .SALES_SIGNALR ?? " localhost:5001" }/salesHub ` );
17
+ const { connection, state } = useSignalR (` http://${import .meta .env .VITE_SALES_SIGNALR ?? " localhost:5001" }/salesHub ` );
18
18
19
19
const processedCount = ref (0 );
20
20
const erroredCount = ref (0 );
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import MessageContainer from "./MessageContainer.vue";
14
14
import { store } from " ./shared" ;
15
15
import { GA4 } from " ../utils/analytics" ;
16
16
17
- const { connection, state } = useSignalR (` http://${import .meta .env .SHIPPING_SIGNALR ?? " localhost:5003" }/shippingHub ` );
17
+ const { connection, state } = useSignalR (` http://${import .meta .env .VITE_SHIPPING_SIGNALR ?? " localhost:5003" }/shippingHub ` );
18
18
19
19
const processedOrderPlacedCount = ref (0 );
20
20
const processedOrderBilledCount = ref (0 );
Original file line number Diff line number Diff line change @@ -3,18 +3,10 @@ import plugin from '@vitejs/plugin-vue';
3
3
4
4
// https://vitejs.dev/config/
5
5
export default defineConfig ( ( ) => {
6
-
7
-
8
6
return {
9
7
plugins : [ plugin ( ) ] ,
10
8
server : {
11
9
port : process . env . PORT ? parseInt ( process . env . PORT ) : 61335 ,
12
- } ,
13
- define : {
14
- BILLING_SIGNALR : process . env . BILLING_SIGNALR ,
15
- CLIENT_SIGNALR : process . env . CLIENT_SIGNALR ,
16
- SALES_SIGNALR : process . env . SALES_SIGNALR ,
17
- SHIPPING_SIGNALR : process . env . SHIPPING_SIGNALR ,
18
10
}
19
11
}
20
12
}
You can’t perform that action at this time.
0 commit comments