| @@ -0,0 +1,12 @@ | |||
| # Items that don't need to be in a Docker image | |||
| # Anything not used by the build system should go here | |||
| Dockerfile | |||
| .dockerignore | |||
| .gitignore | |||
| README.md | |||
| */.git/ | |||
| # Artifacts that will be build during image creation. | |||
| # This should contain all files created during `npm run build`. | |||
| */node_modules/ | |||
| */build/ | |||
| @@ -0,0 +1,15 @@ | |||
| FROM node:16-alpine | |||
| WORKDIR /app | |||
| COPY package*.json ./ | |||
| COPY src ./ | |||
| COPY public ./ | |||
| RUN yarn install | |||
| # Bundle app source | |||
| COPY . . | |||
| EXPOSE 3000 | |||
| CMD ["yarn", "start"] | |||
| @@ -4,6 +4,19 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo | |||
| ## Available Scripts | |||
| ## Docker Scripts | |||
| ### Create docker container | |||
| ### `docker build -t diligent-react-ts .` | |||
| ### Start docker container | |||
| ### `docker run --rm -p 3000:3000 --name diligent-template-ts diligent-react-ts` | |||
| ### Stop docker container | |||
| ### `docker stop diligent-template-ts` | |||
| ### For more information see Dockerfile | |||
| In the project directory, you can run: | |||
| ### `yarn start` | |||
| @@ -7,6 +7,7 @@ import { | |||
| FORGOT_PASSWORD_PAGE, | |||
| NOT_FOUND_PAGE, | |||
| ERROR_PAGE, | |||
| BASE_PAGE, | |||
| } from "./constants/pages"; | |||
| // import LoginPage from './pages/LoginPage/LoginPage'; | |||
| @@ -22,6 +23,7 @@ import PrivateRoute from "./components/Router/PrivateRoute"; | |||
| const AppRoutes = () => ( | |||
| <Routes> | |||
| <Route path="*" element={<NotFoundPage />} /> | |||
| <Route path={BASE_PAGE} element={<LoginPage />} /> | |||
| <Route path={LOGIN_PAGE} element={<LoginPage />} /> | |||
| <Route path={NOT_FOUND_PAGE} element={<NotFoundPage />} /> | |||
| <Route path={ERROR_PAGE} element={<ErrorPage />} /> | |||