dockerized the project for dev
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# The first FROM is now a stage called build-stage
|
||||
|
||||
FROM node:20 AS build-stage
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm ci
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# This is a new stage, everything before this is gone, except for the files that we want to COPY
|
||||
|
||||
FROM nginx:1.25-alpine
|
||||
|
||||
# COPY the directory dist from the build-stage to /usr/share/nginx/html
|
||||
# The target location here was found from the Docker hub page
|
||||
|
||||
COPY --from=build-stage /usr/src/app/build /usr/share/nginx/html
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.cb2b37d1.css",
|
||||
"main.js": "/static/js/main.d19fb767.js",
|
||||
"index.html": "/index.html",
|
||||
"main.cb2b37d1.css.map": "/static/css/main.cb2b37d1.css.map",
|
||||
"main.d19fb767.js.map": "/static/js/main.d19fb767.js.map"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.cb2b37d1.css",
|
||||
"static/js/main.d19fb767.js"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<!doctype html><html lang="en"><head><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><script defer="defer" src="/static/js/main.d19fb767.js"></script><link href="/static/css/main.cb2b37d1.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|
||||
@@ -0,0 +1,2 @@
|
||||
.datePicker :hover{border-color:"#212121"}.datePicker :focus{border-color:"#1976d2";border-width:"2px"}.datePicker{background:"red";color:"red"}.colormebaby{background-color:"red";color:"red"}
|
||||
/*# sourceMappingURL=main.cb2b37d1.css.map*/
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"static/css/main.cb2b37d1.css","mappings":"AAAA,mBACE,sBACF,CACA,mBACE,sBAAuB,CACvB,kBACF,CACA,YAEE,gBAAgB,CADhB,WAEF,CAEA,aACE,sBAAsB,CACtB,WACF","sources":["App2.css"],"sourcesContent":[".datePicker :hover {\n border-color: \"#212121\";\n}\n.datePicker :focus {\n border-color: \"#1976d2\";\n border-width: \"2px\";\n}\n.datePicker{\n color:\"red\";\n background:\"red\";\n}\n\n.colormebaby{\n background-color:\"red\";\n color:\"red\"\n}\n"],"names":[],"sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,121 @@
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim/with-selector.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @mui/styled-engine v5.13.2
|
||||
*
|
||||
* @license MIT
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @remix-run/router v1.7.2
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/**
|
||||
* React Router DOM v6.14.2
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/**
|
||||
* React Router v6.14.2
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,10 @@
|
||||
|
||||
FROM node:20
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm ci
|
||||
|
||||
CMD npm start
|
||||
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
app:
|
||||
image: devcon-frontend-dev
|
||||
build:
|
||||
context: . # The context will pick this directory as the "build context"
|
||||
dockerfile: dev.Dockerfile # This will simply tell which dockerfile to read
|
||||
volumes:
|
||||
- ./:/usr/src/app # The path can be relative, so ./ is enough to say "the same location as the docker-compose.yml"
|
||||
ports:
|
||||
- 5173:3000
|
||||
container_name: devcon-front-dev
|
||||
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
app:
|
||||
image: todo-front-dev
|
||||
build:
|
||||
context: . # The context will pick this directory as the "build context"
|
||||
dockerfile: dev.Dockerfile # This will simply tell which dockerfile to read
|
||||
volumes:
|
||||
- ./:/usr/src/app # The path can be relative, so ./ is enough to say "the same location as the docker-compose.yml"
|
||||
ports:
|
||||
- 5173:5173
|
||||
container_name: todo-front
|
||||
+1
-1
@@ -53,5 +53,5 @@
|
||||
"devDependencies": {
|
||||
"@types/uuid": "^9.0.2"
|
||||
},
|
||||
"proxy": "http://localhost:5000"
|
||||
"proxy": "http://server:5000"
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ const Navbar = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const [anchorElNav, setAnchorElNav] = React.useState<null | HTMLElement>(
|
||||
null
|
||||
null,
|
||||
);
|
||||
const handleOpenNavMenu = (event: React.MouseEvent<HTMLElement>) => {
|
||||
setAnchorElNav(event.currentTarget);
|
||||
@@ -73,7 +73,7 @@ const Navbar = () => {
|
||||
<AdbIcon sx={{ display: { xs: "none", md: "flex" }, mr: 1 }} />
|
||||
{/*LOGO link for bi display*/}
|
||||
<Typography
|
||||
variant="h6"
|
||||
variant="h5"
|
||||
noWrap
|
||||
sx={{
|
||||
mr: 2,
|
||||
|
||||
Reference in New Issue
Block a user