Skip to content

Commit

Permalink
Replace Create React App with Vite.
Browse files Browse the repository at this point in the history
Closes #8944.
  • Loading branch information
fniessink committed Feb 3, 2025
1 parent c7f8fe1 commit aaf7519
Show file tree
Hide file tree
Showing 65 changed files with 6,896 additions and 18,667 deletions.
2 changes: 1 addition & 1 deletion components/frontend/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_VERSION=$npm_package_version
VITE_APP_VERSION=$npm_package_version
6 changes: 4 additions & 2 deletions components/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ FROM node:23.6.1-alpine3.20 AS compile-image
WORKDIR /home/frontend
COPY public /home/frontend/public
COPY package*.json /home/frontend
COPY index.html /home/frontend
COPY *.ts /home/frontend
COPY src /home/frontend/src
COPY .env /home/frontend
RUN npm install --ignore-scripts && \
Expand All @@ -15,7 +17,7 @@ LABEL description="Quality-time frontend"

WORKDIR /home/frontend
COPY healthcheck.js /home/frontend
COPY --from=compile-image /home/frontend/build /home/frontend/build
COPY --from=compile-image /home/frontend/dist /home/frontend/dist
RUN npm install --ignore-scripts -g serve@14.2.4 && \
adduser frontend --disabled-password
USER frontend
Expand All @@ -24,4 +26,4 @@ HEALTHCHECK CMD ["node", "/home/frontend/healthcheck.js"]

# Use the Shell form of CMD instead of the Exec form so the environment variable is substituted
# hadolint ignore=DL3025
CMD serve --listen ${FRONTEND_PORT:-5000} --no-request-logging --single build
CMD serve --listen ${FRONTEND_PORT:-5000} --no-request-logging --single dist
44 changes: 0 additions & 44 deletions components/frontend/README-Create-React-App.md

This file was deleted.

15 changes: 15 additions & 0 deletions components/frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="/manifest.json" />
<title>Quality-time</title>
</head>
<body id="root">
<noscript> You need to enable JavaScript to run this app. </noscript>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
Loading

0 comments on commit aaf7519

Please sign in to comment.