Skip to content

Commit 1f62333

Browse files
committed
finish updating frontends (config, node version, etc.)
1 parent 503606f commit 1f62333

File tree

12 files changed

+67
-31
lines changed

12 files changed

+67
-31
lines changed

customer-management-frontend/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18 as build
1+
FROM node:16 as build
22
WORKDIR /usr/src/app
33
COPY package.json ./
44
COPY package-lock.json ./
@@ -14,6 +14,7 @@ WORKDIR /usr/share/nginx/html
1414

1515
RUN apk add --no-cache nodejs npm
1616
RUN npm install -g @beam-australia/[email protected]
17+
ADD .env ./
1718
ADD entrypoint.sh /var/entrypoint.sh
1819
ENTRYPOINT ["/var/entrypoint.sh"]
1920

customer-management-frontend/package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

customer-management-frontend/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@
4444
"not ie <= 11",
4545
"not op_mini all"
4646
]
47-
}
47+
}

customer-self-service-frontend/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18 as build
1+
FROM node:16 as build
22
WORKDIR /usr/src/app
33
COPY package.json ./
44
COPY package-lock.json ./
@@ -14,6 +14,7 @@ WORKDIR /usr/share/nginx/html
1414

1515
RUN apk add --no-cache nodejs npm
1616
RUN npm install -g @beam-australia/[email protected]
17+
ADD .env ./
1718
ADD entrypoint.sh /var/entrypoint.sh
1819
ENTRYPOINT ["/var/entrypoint.sh"]
1920

customer-self-service-frontend/package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

customer-self-service-frontend/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@
3939
"not ie <= 11",
4040
"not op_mini all"
4141
]
42-
}
42+
}

customer-self-service-frontend/src/App.js

+17-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import React from "react"
44
import { BrowserRouter, Route } from "react-router-dom"
5-
import { Container } from "semantic-ui-react"
5+
import { Container, Message } from "semantic-ui-react"
66
import { Provider, Subscribe } from "unstated"
77

88
import Home from "./pages/Home"
@@ -16,6 +16,7 @@ import SiteHeader from "./components/SiteHeader"
1616
import MenuBar from "./components/MenuBar"
1717
import PrivateRoute from "./components/PrivateRoute"
1818
import Store from "./Store"
19+
import { customerSelfServiceBackend, policyManagementBackend, customerManagementBackend } from "./config"
1920

2021
const store = new Store()
2122

@@ -181,6 +182,21 @@ export default class App extends React.Component<{}> {
181182
/>
182183
)}
183184
/>
185+
<Message style={{ color: "#BBB" }} size="mini">
186+
<Message.Header>
187+
Environment Variable Debug Information
188+
</Message.Header>
189+
<p>
190+
REACT_APP_CUSTOMER_SELF_SERVICE_BACKEND:{" "}
191+
{customerSelfServiceBackend}
192+
<br />
193+
REACT_APP_POLICY_MANAGEMENT_BACKEND:{" "}
194+
{policyManagementBackend}
195+
<br />
196+
REACT_APP_CUSTOMER_MANAGEMENT_BACKEND:{" "}
197+
{customerManagementBackend}
198+
</p>
199+
</Message>
184200
</Container>
185201
</BrowserRouter>
186202
)

docker-compose.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@
44
# run in production mode, so there won't be any live-reloading of changes
55
# or other development features. For development, we recommend to start
66
# the applications invidually or use the run_all_applications scripts.
7-
##
7+
#
88
# To build the Docker images:
99
# docker-compose build
1010
#
1111
# To run the applications:
1212
# docker-compose up
1313
#
14+
# Note that you might have to adjust the REACT_APP_ and VUE_APP environment
15+
# variables pointing to the backend services, depending on your hosting
16+
# environment. By default, they point to localhost, which is fine when running
17+
# the services locally. In a cloud deployment, these should be changed to the
18+
# public domainname of the respective backend service.
19+
#
1420
# To shut down the applications, simply terminate the previous command.
1521
#
1622

@@ -46,6 +52,9 @@ services:
4652
image: lakesidemutual/customer-management-frontend
4753
depends_on:
4854
- customer-management-backend
55+
environment:
56+
- "REACT_APP_CUSTOMER_SELF_SERVICE_BACKEND=http://localhost:8080"
57+
- "REACT_APP_CUSTOMER_MANAGEMENT_BACKEND=http://localhost:8100"
4958
ports:
5059
- "3020:80"
5160

@@ -67,6 +76,8 @@ services:
6776
image: lakesidemutual/policy-management-frontend
6877
depends_on:
6978
- policy-management-backend
79+
environment:
80+
- "REACT_APP_POLICY_MANAGEMENT_BACKEND=http://localhost:8090"
7081
ports:
7182
- "3010:80"
7283

@@ -90,6 +101,10 @@ services:
90101
- customer-self-service-backend
91102
- customer-management-backend
92103
- policy-management-backend
104+
environment:
105+
- "REACT_APP_CUSTOMER_SELF_SERVICE_BACKEND=http://localhost:8080"
106+
- "REACT_APP_POLICY_MANAGEMENT_BACKEND=http://localhost:8090"
107+
- "REACT_APP_CUSTOMER_MANAGEMENT_BACKEND=http://localhost:8100"
93108
ports:
94109
- "3000:80"
95110

policy-management-frontend/package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

policy-management-frontend/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"build": "vue-cli-service build"
99
},
1010
"dependencies": {
11-
"vue": "^2.6.14",
1211
"moment": "^2.29.4",
13-
"semantic-ui-vue": "^0.11.0",
1412
"semantic-ui-css": "^2.5.0",
13+
"semantic-ui-vue": "^0.11.0",
14+
"vue": "^2.6.14",
1515
"vue-router": "^3.5.3"
1616
},
1717
"devDependencies": {
@@ -48,4 +48,4 @@
4848
"last 2 versions",
4949
"not ie <= 8"
5050
]
51-
}
51+
}

policy-management-frontend/src/App.vue

+6-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
<sui-segment>
1414
<router-view />
1515
</sui-segment>
16-
<p style="color: #0000">
17-
VUE_APP_POLICY_MANAGEMENT_BACKEND: {{ policyManagementBackend }}
18-
</p>
16+
<sui-message style="color: #BBB" class="mini">
17+
<sui-message-header>Environment Variable Debug Information</sui-message-header>
18+
<p>
19+
VUE_APP_POLICY_MANAGEMENT_BACKEND: {{ policyManagementBackend }}
20+
</p>
21+
</sui-message>
1922
</div>
2023
</template>
2124

risk-management-server/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18
1+
FROM node:16
22
WORKDIR /usr/src/app
33
COPY package.json ./
44
COPY package-lock.json ./

0 commit comments

Comments
 (0)