Skip to content

Commit

Permalink
Revert "chore: run dist with environment variables kyb-app (#2645)"
Browse files Browse the repository at this point in the history
This reverts commit a139b68.
  • Loading branch information
alonp99 committed Jan 28, 2025
1 parent b6a48f3 commit 0e018fe
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 74 deletions.
13 changes: 2 additions & 11 deletions apps/kyb-app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,20 @@ RUN npm install --legacy-peer-deps
COPY . .

RUN mv /app/.env.example /app/.env

RUN npm run build

ENV PATH="$PATH:/app/node_modules/.bin"
ENV PATH="$PATH:./node_modules/.bin"

EXPOSE 5201

CMD ["npm", "run", "dev", "--host"]
CMD ["npm","run","dev", "--host"]

FROM nginx:stable-alpine as prod

WORKDIR /app

COPY --from=dev /app/dist /usr/share/nginx/html

COPY --from=dev /app/entrypoint.sh /app/entrypoint.sh

COPY example.nginx.conf /etc/nginx/conf.d/default.conf

RUN chmod a+x /app/entrypoint.sh;

EXPOSE 80

ENTRYPOINT [ "/app/entrypoint.sh" ]

CMD ["nginx", "-g", "daemon off;"]
46 changes: 0 additions & 46 deletions apps/kyb-app/entrypoint.sh

This file was deleted.

3 changes: 0 additions & 3 deletions apps/kyb-app/global.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion apps/kyb-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>KYB - Collection Flow</title>
<script type="text/javascript" src="/config.js"></script>
</head>
<body>
<div id="root"></div>
Expand Down
11 changes: 0 additions & 11 deletions apps/kyb-app/public/config.js

This file was deleted.

3 changes: 1 addition & 2 deletions apps/kyb-app/src/common/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import ky, { HTTPError } from 'ky';
import { isExceptionWillBeHandled } from './helpers';

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

0 comments on commit 0e018fe

Please sign in to comment.