Skip to content

Commit 0e018fe

Browse files
committed
Revert "chore: run dist with environment variables kyb-app (#2645)"
This reverts commit a139b68.
1 parent b6a48f3 commit 0e018fe

File tree

6 files changed

+3
-74
lines changed

6 files changed

+3
-74
lines changed

apps/kyb-app/Dockerfile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,20 @@ RUN npm install --legacy-peer-deps
99
COPY . .
1010

1111
RUN mv /app/.env.example /app/.env
12-
1312
RUN npm run build
1413

15-
ENV PATH="$PATH:/app/node_modules/.bin"
14+
ENV PATH="$PATH:./node_modules/.bin"
1615

1716
EXPOSE 5201
1817

19-
CMD ["npm", "run", "dev", "--host"]
18+
CMD ["npm","run","dev", "--host"]
2019

2120
FROM nginx:stable-alpine as prod
2221

23-
WORKDIR /app
24-
2522
COPY --from=dev /app/dist /usr/share/nginx/html
2623

27-
COPY --from=dev /app/entrypoint.sh /app/entrypoint.sh
28-
2924
COPY example.nginx.conf /etc/nginx/conf.d/default.conf
3025

31-
RUN chmod a+x /app/entrypoint.sh;
32-
3326
EXPOSE 80
3427

35-
ENTRYPOINT [ "/app/entrypoint.sh" ]
36-
3728
CMD ["nginx", "-g", "daemon off;"]

apps/kyb-app/entrypoint.sh

Lines changed: 0 additions & 46 deletions
This file was deleted.

apps/kyb-app/global.d.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

apps/kyb-app/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
99
<title>KYB - Collection Flow</title>
10-
<script type="text/javascript" src="/config.js"></script>
1110
</head>
1211
<body>
1312
<div id="root"></div>

apps/kyb-app/public/config.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

apps/kyb-app/src/common/utils/request.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import ky, { HTTPError } from 'ky';
44
import { isExceptionWillBeHandled } from './helpers';
55

66
export const request = ky.create({
7-
//@ts-ignore
8-
prefixUrl: globalThis.env.VITE_API_URL || `${window.location.origin}/api/v1/`,
7+
prefixUrl: import.meta.env.VITE_API_URL || `${window.location.origin}/api/v1/`,
98
retry: {
109
limit: 1,
1110
statusCodes: [500, 408, 404, 404, 403, 401],

0 commit comments

Comments
 (0)