diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d1cf990 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +node_modules +build +.dockerignore +Dockerfile +*.md +.git \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e4466a7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Step 1: Build the React app +FROM node:18-alpine AS build + +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +# Step 2: Serve with NGINX +FROM nginx:stable-alpine + +COPY --from=build /app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a6b172c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3' +services: + web: + build: . + ports: + - "3000:80" \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..6f6f93f --- /dev/null +++ b/nginx.conf @@ -0,0 +1,12 @@ +server { + listen 80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri /index.html; + } + + error_page 404 /index.html; +} \ No newline at end of file diff --git a/src/App.css b/src/App.css index 73c7a9c..d54ede8 100644 --- a/src/App.css +++ b/src/App.css @@ -11,9 +11,11 @@ will-change: filter; transition: filter 300ms; } + .logo:hover { filter: drop-shadow(0 0 2em #646cffaa); } + .logo.react:hover { filter: drop-shadow(0 0 2em #61dafbaa); } @@ -22,6 +24,7 @@ from { transform: rotate(0deg); } + to { transform: rotate(360deg); } diff --git a/src/App.jsx b/src/App.jsx index d57c311..c3678f2 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -7,6 +7,7 @@ import Box from '@mui/material/Box'; import Products from './private/products/Products'; import Clients from './private/clients/Clients'; import Providers from './private/providers/Providers'; +import Categories from './private/categories/Categories'; function App() { const [zone, setZone] = useState('public'); // Could be 'public' | 'restricted' | 'private' @@ -31,7 +32,8 @@ function App() { {zone === 'public' && currentView === 'Products' && } {zone === 'public' && currentView === 'Clients' && } - {zone === 'public' && currentView === 'Providers' && } + {zone === 'public' && currentView === 'Providers' && } + {zone === 'public' && currentView === 'Categories' && }