| # 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/ |
| 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"] |
| ## Available Scripts | ## 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: | In the project directory, you can run: | ||||
| ### `yarn start` | ### `yarn start` |
| FORGOT_PASSWORD_PAGE, | FORGOT_PASSWORD_PAGE, | ||||
| NOT_FOUND_PAGE, | NOT_FOUND_PAGE, | ||||
| ERROR_PAGE, | ERROR_PAGE, | ||||
| BASE_PAGE, | |||||
| } from "./constants/pages"; | } from "./constants/pages"; | ||||
| // import LoginPage from './pages/LoginPage/LoginPage'; | // import LoginPage from './pages/LoginPage/LoginPage'; | ||||
| const AppRoutes = () => ( | const AppRoutes = () => ( | ||||
| <Routes> | <Routes> | ||||
| <Route path="*" element={<NotFoundPage />} /> | <Route path="*" element={<NotFoundPage />} /> | ||||
| <Route path={BASE_PAGE} element={<LoginPage />} /> | |||||
| <Route path={LOGIN_PAGE} element={<LoginPage />} /> | <Route path={LOGIN_PAGE} element={<LoginPage />} /> | ||||
| <Route path={NOT_FOUND_PAGE} element={<NotFoundPage />} /> | <Route path={NOT_FOUND_PAGE} element={<NotFoundPage />} /> | ||||
| <Route path={ERROR_PAGE} element={<ErrorPage />} /> | <Route path={ERROR_PAGE} element={<ErrorPage />} /> |