diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..9eb89a12 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +# ============ Stage 1: Build with Node ============ +FROM node:22 AS builder + +# Set the working directory +WORKDIR /app + +# Copy package.json and package-lock.json (for caching) +COPY package*.json ./ + +# Install dependencies +RUN npm install --frozen-lockfile + +# Copy the rest of your source code +COPY . . + +# Build the static production files to /app/dist +RUN npm run build + + +# ============ Stage 2: Use nginxinc/nginx-unprivileged ============ +FROM nginxinc/nginx-unprivileged:latest + +# Clean up default content (optional) +USER root +RUN rm -rf /usr/share/nginx/html/* +USER 101 + +# Copy the build artifacts from the builder stage +COPY --from=builder /app/dist /usr/share/nginx/html + +# This image listens on port 8080 by default (unprivileged port). +EXPOSE 8080 + +# Run NGINX in the foreground +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/src/pages/VideoWall/VideoWall.tsx b/src/pages/VideoWall/VideoWall.tsx index 4592b972..7e2400b4 100644 --- a/src/pages/VideoWall/VideoWall.tsx +++ b/src/pages/VideoWall/VideoWall.tsx @@ -3,7 +3,7 @@ import ReactGridLayout, {Responsive, WidthProvider, Layout} from "react-grid-lay import styled from "styled-components"; import {AspectRatio, Button, ComboboxItem, Modal, Select} from "@mantine/core"; import classes from './video_wall.module.css' -import React, {MouseEvent, useCallback, useEffect, useState} from "react"; +import React, {useCallback, useEffect, useState} from "react"; import axios from "@/axios_config.tsx"; import {apiRoutes} from "@/apiRoutes.tsx"; import { ResizableBox } from 'react-resizable';