mirror of
https://github.com/XFox111/MuiCharts.git
synced 2026-04-22 06:51:05 +03:00
- Added Dockerfile
- Fixed ESLint error
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
dist/
|
||||
node_modules/
|
||||
.devcontainer/
|
||||
.github/
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# Use the official Node.js 20 image as the base image
|
||||
FROM node:20 as builder
|
||||
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the package.json and package-lock.json files to the working directory
|
||||
COPY package*.json ./
|
||||
|
||||
# Install the app dependencies
|
||||
RUN yarn install
|
||||
|
||||
# Copy the app source code to the working directory
|
||||
COPY . .
|
||||
|
||||
# Build the app
|
||||
RUN yarn build
|
||||
|
||||
# Use the official Nginx image as the base image
|
||||
FROM nginx:latest as prod
|
||||
|
||||
# Copy the build output to replace the default Nginx contents
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# Expose port 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -2,7 +2,6 @@ import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import App from "./App";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
|
||||
Reference in New Issue
Block a user