diff --git a/.prettierrc.json b/.prettierrc.json index 599632e71..d160601e0 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -3,5 +3,6 @@ "semi": true, "printWidth": 100, "trailingComma": "all", + "endOfLine": "auto" } \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8e6421de2..abf90a4aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,27 @@ # Используем официальный образ Node.js на базе Alpine FROM node:alpine as docs - +RUN adduser -D -u 1001 app +# RUN useradd -ms /bin/sh -u 1001 app +USER app # Устанавливаем рабочую директорию WORKDIR /app - # Копируем package.json и package-lock.json (если доступен) в рабочую директорию -COPY package.json ./ +COPY --chown=app:app package.json ./ # COPY package-lock.json ./ # Раскомментируйте эту строку, если у вас есть package-lock.json -COPY ./docs/ ./docs/ +# COPY --chown=app:app ./docs/ ./docs/ # Очищаем кэш npm и устанавливаем зависимости -RUN npm install +# RUN npm install # RUN npm run githooks -COPY src/front/package.json ./src/front/package.json +COPY --chown=app:app src/front/package.json ./src/front/package.json RUN npm install --prefix ./src/front # Копируем файлы документации в контейнер -COPY ./src/front/ ./src/front/ +COPY --chown=app:app ./src/front/ ./src/front # Открываем порт, на котором работает приложение EXPOSE 5173 3000 # Команда для запуска приложения - -CMD ["sh", "-c", "npm run docs:dev & npm run dev --prefix ./src/front"] \ No newline at end of file +# & npm run dev --prefix ./src/front +# & npm run dev --prefix ./src/front +CMD ["sh", "-c", "npm run dev --prefix ./src/front "] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 723378bd8..cc9329bb9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,17 +5,29 @@ networks: services: frontend: + tty: true restart: always build: context: ./ - volumes: - - - /docs:/docs - - /src/front:/front + volumes: + - ./docs:/app/docs + + - /app/node_modules + - /app/src/front/node_modules ports: - "3000:3000" - - "5173:5173" + + develop: + watch: + - action: sync + path: ./src/front + target: /app/src/front + ignore: + - node_modules/ + + - action: rebuild + path: package.json networks: - dev @@ -54,6 +66,7 @@ services: - dev depends_on: - db + - redis volumes: - ./src/back:/back nginx: diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 3d9620a28..24c2cff6a 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -18,6 +18,174 @@ export default withMermaid({ "text": "components", "collapsed": true, "items": [ + { + "text": "CountDown", + "link": "/src/components/CountDown" + }, + { + "text": "UI", + "collapsed": true, + "items": [ + { + "text": "Auth-form", + "link": "/src/components/UI/Auth-form" + }, + { + "text": "NewsCard", + "link": "/src/components/UI/NewsCard" + }, + { + "text": "PatternTabs", + "link": "/src/components/UI/PatternTabs" + }, + { + "text": "Timer", + "link": "/src/components/UI/Timer" + }, + { + "text": "aboutportal", + "collapsed": true, + "items": [ + { + "text": "card-feedback", + "link": "/src/components/UI/aboutportal/card-feedback" + }, + { + "text": "card-top-comment", + "link": "/src/components/UI/aboutportal/card-top-comment" + }, + { + "text": "card-total", + "link": "/src/components/UI/aboutportal/card-total" + }, + { + "text": "card_top_comment", + "collapsed": true, + "items": [ + { + "text": "card-comment", + "link": "/src/components/UI/aboutportal/card_top_comment/card-comment" + } + ] + }, + { + "text": "feedmodul", + "link": "/src/components/UI/aboutportal/feedmodul" + }, + { + "text": "line-chart", + "link": "/src/components/UI/aboutportal/line-chart" + }, + { + "text": "pattern-card-feed", + "link": "/src/components/UI/aboutportal/pattern-card-feed" + }, + { + "text": "pattern-card", + "link": "/src/components/UI/aboutportal/pattern-card" + }, + { + "text": "portal-traffic", + "link": "/src/components/UI/aboutportal/portal-traffic" + }, + { + "text": "rating-page", + "link": "/src/components/UI/aboutportal/rating-page" + }, + { + "text": "toolbar-filter", + "link": "/src/components/UI/aboutportal/toolbar-filter" + }, + { + "text": "tooltip-ico", + "link": "/src/components/UI/aboutportal/tooltip-ico" + }, + { + "text": "tooltip-user", + "link": "/src/components/UI/aboutportal/tooltip-user" + }, + { + "text": "top-user", + "link": "/src/components/UI/aboutportal/top-user" + } + ] + }, + { + "text": "date-select", + "link": "/src/components/UI/date-select" + }, + { + "text": "defaultportal", + "collapsed": true, + "items": [ + { + "text": "page-counter", + "link": "/src/components/UI/defaultportal/page-counter" + }, + { + "text": "uploading-file", + "link": "/src/components/UI/defaultportal/uploading-file" + } + ] + }, + { + "text": "feedback", + "collapsed": true, + "items": [ + { + "text": "feedstar-like", + "link": "/src/components/UI/feedback/feedstar-like" + }, + { + "text": "statistik-like", + "link": "/src/components/UI/feedback/statistik-like" + } + ] + }, + { + "text": "fiousercard", + "collapsed": true, + "items": [ + { + "text": "icoUser", + "link": "/src/components/UI/fiousercard/icoUser" + }, + { + "text": "infoUserCard", + "link": "/src/components/UI/fiousercard/infoUserCard" + }, + { + "text": "listUser", + "link": "/src/components/UI/fiousercard/listUser" + }, + { + "text": "onlineUsers", + "link": "/src/components/UI/fiousercard/onlineUsers" + }, + { + "text": "vcardUser", + "link": "/src/components/UI/fiousercard/vcardUser" + } + ] + }, + { + "text": "index", + "link": "/src/components/UI/index" + }, + { + "text": "my-helper", + "link": "/src/components/UI/my-helper" + }, + { + "text": "tooltip-number", + "link": "/src/components/UI/tooltip-number" + }, + { + "text": "tooltip-text", + "link": "/src/components/UI/tooltip-text" + } + ] + }, { "text": "about_inspection", "collapsed": true, @@ -28,7 +196,7 @@ export default withMermaid({ "items": [ { "text": "ContactInfo", - "link": "/src/components\\about_inspection\\contacts\\ContactInfo" + "link": "/src/components/about_inspection/contacts/ContactInfo" } ] }, @@ -38,11 +206,11 @@ export default withMermaid({ "items": [ { "text": "GeneralInformation", - "link": "/src/components\\about_inspection\\general_information\\GeneralInformation" + "link": "/src/components/about_inspection/general_information/GeneralInformation" }, { "text": "GeneralInformationSize", - "link": "/src/components\\about_inspection\\general_information\\GeneralInformationSize" + "link": "/src/components/about_inspection/general_information/GeneralInformationSize" } ] }, @@ -52,11 +220,11 @@ export default withMermaid({ "items": [ { "text": "OpenVacancies", - "link": "/src/components\\about_inspection\\open_vacancies\\OpenVacancies" + "link": "/src/components/about_inspection/open_vacancies/OpenVacancies" }, { "text": "ResponseVacancies", - "link": "/src/components\\about_inspection\\open_vacancies\\ResponseVacancies" + "link": "/src/components/about_inspection/open_vacancies/ResponseVacancies" } ] }, @@ -66,11 +234,11 @@ export default withMermaid({ "items": [ { "text": "StructureInspection", - "link": "/src/components\\about_inspection\\structure\\StructureInspection" + "link": "/src/components/about_inspection/structure/StructureInspection" }, { "text": "StructureInspectionRow", - "link": "/src/components\\about_inspection\\structure\\StructureInspectionRow" + "link": "/src/components/about_inspection/structure/StructureInspectionRow" } ] } @@ -82,51 +250,7 @@ export default withMermaid({ "items": [ { "text": "BigCalendar", - "link": "/src/components\\calendar_of_events\\BigCalendar" - }, - { - "text": "calendar-create-select", - "link": "/src/components\\calendar_of_events\\calendar-create-select" - }, - { - "text": "calendar-create", - "link": "/src/components\\calendar_of_events\\calendar-create" - }, - { - "text": "calendar-my", - "link": "/src/components\\calendar_of_events\\calendar-my" - }, - { - "text": "event-calendar", - "link": "/src/components\\calendar_of_events\\event-calendar" - }, - { - "text": "event-create", - "link": "/src/components\\calendar_of_events\\event-create" - }, - { - "text": "event-dialog-edit-participant", - "link": "/src/components\\calendar_of_events\\event-dialog-edit-participant" - }, - { - "text": "event-dialog-edit", - "link": "/src/components\\calendar_of_events\\event-dialog-edit" - }, - { - "text": "event-dialog-info", - "link": "/src/components\\calendar_of_events\\event-dialog-info" - }, - { - "text": "event-dialog", - "link": "/src/components\\calendar_of_events\\event-dialog" - }, - { - "text": "load-ical", - "link": "/src/components\\calendar_of_events\\load-ical" - }, - { - "text": "load-ical1", - "link": "/src/components\\calendar_of_events\\load-ical1" + "link": "/src/components/calendar_of_events/BigCalendar" }, { "text": "UI_calendar", @@ -134,51 +258,91 @@ export default withMermaid({ "items": [ { "text": "calendarFull", - "link": "/src/components\\calendar_of_events\\UI_calendar\\calendarFull" + "link": "/src/components/calendar_of_events/UI_calendar/calendarFull" }, { "text": "dialogCreate", - "link": "/src/components\\calendar_of_events\\UI_calendar\\dialogCreate" + "link": "/src/components/calendar_of_events/UI_calendar/dialogCreate" }, { "text": "periodEvents", - "link": "/src/components\\calendar_of_events\\UI_calendar\\periodEvents" + "link": "/src/components/calendar_of_events/UI_calendar/periodEvents" }, { "text": "reminderEvent", - "link": "/src/components\\calendar_of_events\\UI_calendar\\reminderEvent" + "link": "/src/components/calendar_of_events/UI_calendar/reminderEvent" }, { "text": "timeSelect", - "link": "/src/components\\calendar_of_events\\UI_calendar\\timeSelect" + "link": "/src/components/calendar_of_events/UI_calendar/timeSelect" } ] + }, + { + "text": "calendar-create-select", + "link": "/src/components/calendar_of_events/calendar-create-select" + }, + { + "text": "calendar-create", + "link": "/src/components/calendar_of_events/calendar-create" + }, + { + "text": "calendar-my", + "link": "/src/components/calendar_of_events/calendar-my" + }, + { + "text": "event-calendar", + "link": "/src/components/calendar_of_events/event-calendar" + }, + { + "text": "event-create", + "link": "/src/components/calendar_of_events/event-create" + }, + { + "text": "event-dialog-edit-participant", + "link": "/src/components/calendar_of_events/event-dialog-edit-participant" + }, + { + "text": "event-dialog-edit", + "link": "/src/components/calendar_of_events/event-dialog-edit" + }, + { + "text": "event-dialog-info", + "link": "/src/components/calendar_of_events/event-dialog-info" + }, + { + "text": "event-dialog", + "link": "/src/components/calendar_of_events/event-dialog" + }, + { + "text": "load-ical", + "link": "/src/components/calendar_of_events/load-ical" + }, + { + "text": "load-ical1", + "link": "/src/components/calendar_of_events/load-ical1" } ] }, { "text": "cardLike", - "link": "/src/components\\cardLike" + "link": "/src/components/cardLike" }, { "text": "carousel-list", - "link": "/src/components\\carousel-list" + "link": "/src/components/carousel-list" }, { "text": "carousel-numbers", - "link": "/src/components\\carousel-numbers" - }, - { - "text": "CountDown", - "link": "/src/components\\CountDown" + "link": "/src/components/carousel-numbers" }, { "text": "dialog-search", - "link": "/src/components\\dialog-search" + "link": "/src/components/dialog-search" }, { "text": "digital-letna", - "link": "/src/components\\digital-letna" + "link": "/src/components/digital-letna" }, { "text": "graph", @@ -186,25 +350,25 @@ export default withMermaid({ "items": [ { "text": "line-graph", - "link": "/src/components\\graph\\line-graph" + "link": "/src/components/graph/line-graph" } ] }, { "text": "load-round", - "link": "/src/components\\load-round" + "link": "/src/components/load-round" }, { "text": "news-crossroad", - "link": "/src/components\\news-crossroad" + "link": "/src/components/news-crossroad" }, { "text": "news-full", - "link": "/src/components\\news-full" + "link": "/src/components/news-full" }, { "text": "news-home", - "link": "/src/components\\news-home" + "link": "/src/components/news-home" }, { "text": "secret", @@ -212,7 +376,7 @@ export default withMermaid({ "items": [ { "text": "SmallTimer", - "link": "/src/components\\secret\\SmallTimer" + "link": "/src/components/secret/SmallTimer" } ] }, @@ -222,15 +386,15 @@ export default withMermaid({ "items": [ { "text": "CatalogTest", - "link": "/src/components\\testing\\CatalogTest" + "link": "/src/components/testing/CatalogTest" }, { "text": "DetailCardTest", - "link": "/src/components\\testing\\DetailCardTest" + "link": "/src/components/testing/DetailCardTest" }, { "text": "HeaderDetailTesting", - "link": "/src/components\\testing\\HeaderDetailTesting" + "link": "/src/components/testing/HeaderDetailTesting" } ] }, @@ -240,171 +404,7 @@ export default withMermaid({ "items": [ { "text": "TestCard", - "link": "/src/components\\tests\\TestCard" - } - ] - }, - { - "text": "UI", - "collapsed": true, - "items": [ - { - "text": "aboutportal", - "collapsed": true, - "items": [ - { - "text": "card-feedback", - "link": "/src/components\\UI\\aboutportal\\card-feedback" - }, - { - "text": "card-top-comment", - "link": "/src/components\\UI\\aboutportal\\card-top-comment" - }, - { - "text": "card-total", - "link": "/src/components\\UI\\aboutportal\\card-total" - }, - { - "text": "card_top_comment", - "collapsed": true, - "items": [ - { - "text": "card-comment", - "link": "/src/components\\UI\\aboutportal\\card_top_comment\\card-comment" - } - ] - }, - { - "text": "feedmodul", - "link": "/src/components\\UI\\aboutportal\\feedmodul" - }, - { - "text": "line-chart", - "link": "/src/components\\UI\\aboutportal\\line-chart" - }, - { - "text": "pattern-card-feed", - "link": "/src/components\\UI\\aboutportal\\pattern-card-feed" - }, - { - "text": "pattern-card", - "link": "/src/components\\UI\\aboutportal\\pattern-card" - }, - { - "text": "portal-traffic", - "link": "/src/components\\UI\\aboutportal\\portal-traffic" - }, - { - "text": "rating-page", - "link": "/src/components\\UI\\aboutportal\\rating-page" - }, - { - "text": "toolbar-filter", - "link": "/src/components\\UI\\aboutportal\\toolbar-filter" - }, - { - "text": "tooltip-ico", - "link": "/src/components\\UI\\aboutportal\\tooltip-ico" - }, - { - "text": "tooltip-user", - "link": "/src/components\\UI\\aboutportal\\tooltip-user" - }, - { - "text": "top-user", - "link": "/src/components\\UI\\aboutportal\\top-user" - } - ] - }, - { - "text": "Auth-form", - "link": "/src/components\\UI\\Auth-form" - }, - { - "text": "date-select", - "link": "/src/components\\UI\\date-select" - }, - { - "text": "defaultportal", - "collapsed": true, - "items": [ - { - "text": "page-counter", - "link": "/src/components\\UI\\defaultportal\\page-counter" - }, - { - "text": "uploading-file", - "link": "/src/components\\UI\\defaultportal\\uploading-file" - } - ] - }, - { - "text": "feedback", - "collapsed": true, - "items": [ - { - "text": "feedstar-like", - "link": "/src/components\\UI\\feedback\\feedstar-like" - }, - { - "text": "statistik-like", - "link": "/src/components\\UI\\feedback\\statistik-like" - } - ] - }, - { - "text": "fiousercard", - "collapsed": true, - "items": [ - { - "text": "icoUser", - "link": "/src/components\\UI\\fiousercard\\icoUser" - }, - { - "text": "infoUserCard", - "link": "/src/components\\UI\\fiousercard\\infoUserCard" - }, - { - "text": "listUser", - "link": "/src/components\\UI\\fiousercard\\listUser" - }, - { - "text": "onlineUsers", - "link": "/src/components\\UI\\fiousercard\\onlineUsers" - }, - { - "text": "vcardUser", - "link": "/src/components\\UI\\fiousercard\\vcardUser" - } - ] - }, - { - "text": "index", - "link": "/src/components\\UI\\index" - }, - { - "text": "my-helper", - "link": "/src/components\\UI\\my-helper" - }, - { - "text": "NewsCard", - "link": "/src/components\\UI\\NewsCard" - }, - { - "text": "PatternTabs", - "link": "/src/components\\UI\\PatternTabs" - }, - { - "text": "Timer", - "link": "/src/components\\UI\\Timer" - }, - { - "text": "tooltip-number", - "link": "/src/components\\UI\\tooltip-number" - }, - { - "text": "tooltip-text", - "link": "/src/components\\UI\\tooltip-text" + "link": "/src/components/tests/TestCard" } ] }, @@ -414,43 +414,43 @@ export default withMermaid({ "items": [ { "text": "CurrentVote", - "link": "/src/components\\vote\\CurrentVote" - }, - { - "text": "NoneVote", - "link": "/src/components\\vote\\NoneVote" + "link": "/src/components/vote/CurrentVote" }, { "text": "NonVoteHappy", - "link": "/src/components\\vote\\NonVoteHappy" + "link": "/src/components/vote/NonVoteHappy" }, { "text": "NonVoteSad", - "link": "/src/components\\vote\\NonVoteSad" + "link": "/src/components/vote/NonVoteSad" + }, + { + "text": "NoneVote", + "link": "/src/components/vote/NoneVote" }, { "text": "VoteAdmin", - "link": "/src/components\\vote\\VoteAdmin" + "link": "/src/components/vote/VoteAdmin" }, { "text": "VoteAnimation", - "link": "/src/components\\vote\\VoteAnimation" + "link": "/src/components/vote/VoteAnimation" }, { "text": "VoteCard", - "link": "/src/components\\vote\\VoteCard" + "link": "/src/components/vote/VoteCard" }, { "text": "VoteConstructor", - "link": "/src/components\\vote\\VoteConstructor" + "link": "/src/components/vote/VoteConstructor" }, { "text": "VoteForm", - "link": "/src/components\\vote\\VoteForm" + "link": "/src/components/vote/VoteForm" }, { "text": "VoteResult", - "link": "/src/components\\vote\\VoteResult" + "link": "/src/components/vote/VoteResult" } ] } @@ -466,15 +466,15 @@ export default withMermaid({ "items": [ { "text": "AdminMenu", - "link": "/src/layouts\\default\\AdminMenu" - }, - { - "text": "alertDefault", - "link": "/src/layouts\\default\\alertDefault" + "link": "/src/layouts/default/AdminMenu" }, { "text": "DefaultPortal", - "link": "/src/layouts\\default\\DefaultPortal" + "link": "/src/layouts/default/DefaultPortal" + }, + { + "text": "alertDefault", + "link": "/src/layouts/default/alertDefault" } ] } @@ -490,15 +490,15 @@ export default withMermaid({ "items": [ { "text": "index", - "link": "/src/plugins\\index" + "link": "/src/plugins/index" }, { "text": "vuetify", - "link": "/src/plugins\\vuetify" + "link": "/src/plugins/vuetify" }, { "text": "webfontloader", - "link": "/src/plugins\\webfontloader" + "link": "/src/plugins/webfontloader" } ] }, @@ -508,7 +508,7 @@ export default withMermaid({ "items": [ { "text": "index", - "link": "/src/router\\index" + "link": "/src/router/index" } ] }, @@ -518,31 +518,31 @@ export default withMermaid({ "items": [ { "text": "AboutPortalFilter", - "link": "/src/store\\AboutPortalFilter" + "link": "/src/store/AboutPortalFilter" }, { "text": "AccountStore", - "link": "/src/store\\AccountStore" - }, - { - "text": "app", - "link": "/src/store\\app" - }, - { - "text": "index", - "link": "/src/store\\index" + "link": "/src/store/AccountStore" }, { "text": "MainmenuStore", - "link": "/src/store\\MainmenuStore" - }, - { - "text": "UseAlertStore", - "link": "/src/store\\UseAlertStore" + "link": "/src/store/MainmenuStore" }, { "text": "WeekendsStore", - "link": "/src/store\\WeekendsStore" + "link": "/src/store/WeekendsStore" + }, + { + "text": "app", + "link": "/src/store/app" + }, + { + "text": "index", + "link": "/src/store/index" + }, + { + "text": "useAlertStore", + "link": "/src/store/useAlertStore" } ] }, @@ -552,11 +552,11 @@ export default withMermaid({ "items": [ { "text": "axios-api", - "link": "/src/utils\\axios-api" + "link": "/src/utils/axios-api" }, { "text": "universal_functions", - "link": "/src/utils\\universal_functions" + "link": "/src/utils/universal_functions" } ] }, @@ -566,31 +566,59 @@ export default withMermaid({ "items": [ { "text": "AboutInspectionPage", - "link": "/src/views\\AboutInspectionPage" + "link": "/src/views/AboutInspectionPage" }, { "text": "AboutPortalPage", - "link": "/src/views\\AboutPortalPage" + "link": "/src/views/AboutPortalPage" }, { "text": "FAQPage", - "link": "/src/views\\FAQPage" + "link": "/src/views/FAQPage" }, { "text": "FeedbackPage", - "link": "/src/views\\FeedbackPage" + "link": "/src/views/FeedbackPage" }, { "text": "FnsHol", - "link": "/src/views\\FnsHol" + "link": "/src/views/FnsHol" }, { "text": "HomePage", - "link": "/src/views\\HomePage" + "link": "/src/views/HomePage" }, { "text": "LaborProtection", - "link": "/src/views\\LaborProtection" + "link": "/src/views/LaborProtection" + }, + { + "text": "NewsPage", + "link": "/src/views/NewsPage" + }, + { + "text": "ProvidingActivitiesPage", + "link": "/src/views/ProvidingActivitiesPage" + }, + { + "text": "SecurityPage", + "link": "/src/views/SecurityPage" + }, + { + "text": "StructurePage", + "link": "/src/views/StructurePage" + }, + { + "text": "TestHomePage", + "link": "/src/views/TestHomePage" + }, + { + "text": "Vote", + "link": "/src/views/Vote" + }, + { + "text": "VoteHomePage", + "link": "/src/views/VoteHomePage" }, { "text": "nested_view", @@ -598,37 +626,29 @@ export default withMermaid({ "items": [ { "text": "o_OKiB", - "link": "/src/views\\nested_view\\o_OKiB" + "link": "/src/views/nested_view/o_OKiB" } ] }, - { - "text": "NewsPage", - "link": "/src/views\\NewsPage" - }, - { - "text": "ProvidingActivitiesPage", - "link": "/src/views\\ProvidingActivitiesPage" - }, { "text": "safety", "collapsed": true, "items": [ { "text": "ChaptersSafety", - "link": "/src/views\\safety\\ChaptersSafety" + "link": "/src/views/safety/ChaptersSafety" }, { "text": "DocumentationSafety", - "link": "/src/views\\safety\\DocumentationSafety" + "link": "/src/views/safety/DocumentationSafety" }, { "text": "MainInfoSafety", - "link": "/src/views\\safety\\MainInfoSafety" + "link": "/src/views/safety/MainInfoSafety" }, { "text": "TestSafety", - "link": "/src/views\\safety\\TestSafety" + "link": "/src/views/safety/TestSafety" } ] }, @@ -638,29 +658,9 @@ export default withMermaid({ "items": [ { "text": "SecretPage", - "link": "/src/views\\secret\\SecretPage" + "link": "/src/views/secret/SecretPage" } ] - }, - { - "text": "SecurityPage", - "link": "/src/views\\SecurityPage" - }, - { - "text": "StructurePage", - "link": "/src/views\\StructurePage" - }, - { - "text": "TestHomePage", - "link": "/src/views\\TestHomePage" - }, - { - "text": "Vote", - "link": "/src/views\\Vote" - }, - { - "text": "VoteHomePage", - "link": "/src/views\\VoteHomePage" } ] } @@ -671,7 +671,8 @@ export default withMermaid({ collapsed: true, items: [ { text: 'Как установить', link: '/guides/install' }, - { text: 'Как использовать', link: '/guides/usage' } + { text: 'Как использовать', link: '/guides/usage' }, + { text: 'Правила комитов', link: '/guides/commits' } ] } ] diff --git a/docs/.vitepress/theme/components/TestRunner.vue b/docs/.vitepress/theme/components/TestRunner.vue new file mode 100644 index 000000000..089a2ac0f --- /dev/null +++ b/docs/.vitepress/theme/components/TestRunner.vue @@ -0,0 +1,73 @@ + + + + Результаты тестов: + + ✅ Все тесты успешно пройдены! + + + ❌ Ошибки в тестах: {{ results.numFailedTestSuites }} + + + {{ errorMessage }} + + + + {{ test.name }} + + ✅ Успешно + ❌ Ошибка + {{ test.message }} + + + + + + + + diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js new file mode 100644 index 000000000..fdae2455f --- /dev/null +++ b/docs/.vitepress/theme/index.js @@ -0,0 +1,22 @@ + + import DefaultTheme from 'vitepress/theme'; +import { withMermaid } from 'vitepress-plugin-mermaid'; +import TestRunner from './components/TestRunner.vue'; + +export default withMermaid({ + ...DefaultTheme, + themeConfig: { + search: { + provider: 'local', + }, + }, + mermaid: { + }, + mermaidPlugin: { + class: 'mermaid my-class', + }, + enhanceApp({ app }) { + app.component('TestRunner', TestRunner); + }, +}); + \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 1b416ef02..8ce466674 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,114 +1,3 @@ -# IS#26 Портал ЦОД-2 +# Документация -[Общие работы по проекту](/COD2/PORTAL_COD2/projects/22) - - -Prod Portal9966/ (10.252.44.28) -Test Potal-t/ (10.252.44.60) - -## Стэк ## -1. Python 3.10 -2. Vuetify3 -3. MySQL -4. Redis - -## Особенности веток ## -У разработчиков у каждого своя ветка. - -npm version patch производится на ветке razrab - -окончательная сборка - на main -## Схема ## - - - -```mermaid -flowchart TD -A[Клиент] <-->|Запрос к серверу PORTAL9966/ или PORTAL-t/| B{Nginx:80} - B <-->|Фронт /| C[Vuetify 3 /var/www/PORTAL_COD2/src/front/dist] - B <-->|бэк /api /admin /ws| D{Daphne :9966} - D<--> |/ws| E[Django channels] - E<-->F[Redis :6379] - D<-->|Admin|G{Django} - G<-->|10.252.44.13:8005|H[Авторизация FAST API сервер] - H<-->J[Active Directory] - G<-->|10.252.44.33:3306|I[MySQL БД Справочник] - B<-->|/static /media|K[Файлы /var/www/PORTAL_COD2/src/media /var/www/PORTAL_COD2/src/static/ ] -``` - -## Установка и настройка ## - -### Первоначальная установка после клонирования в папку. В случае неисправностей, идти примерно по этому же пути ### - -Инициализация проекта: - -- Инициализировать git -- Выполнить git clone - -1. В каталоге проекта Создаем окружение - -``` python3.10 -m venv env ``` - -2. Активируем окружение - -``` source env/bin/activate``` - -3. устанавливаем необходимые пакеты - -``` cd sys ``` -```pip install -r r.txt --proxy= http://...``` - -Если нет proxy: - -На машине разработки выполнить команду ```pip download -r ../r.txt``` - -Команда для установки python -```pip install --no-index --find-links /Путь_К_Папке_С_Пакетами/ -r r.txt``` - -Запушить изменения в ветку - -Синхронизировать ветку на сервере - -``` git pull ``` - -Если произошла ошибка: ``` git reset --hard ``` - -4. переходим в каталог src - -``` cd ../src/``` - -5. В каталог src разархивируем portal.zip из sys - Прописываем подключения в settings.py - - -6. Для проверки запускаем сервер разработки - -```python manage.py runserver``` - -Если в консоли не появляются ошибки и сервер стартует, переходим далее. В противном случае - доустанавливаем необходимые пакеты. - - 7. останавливаем сервер разработки (CTRL+C) - -На этом работы непосредственно с бэкэндом завершены -### Порты ### - Daphne: 9966 - -### Настройка NGINX, GUNICORN, Vuetify, Daphne ### - В каталоге sys расположены примерные файлы конфигов для тестового и боевого серверов - - Тестовый сервер: /sys/test_server - -При копировании убедиться, что пути соответствуют системе - #### NGINX Vuetify #### - Стандартный путь для файлов .conf - /etc/nginx/sites-enabled - - -#### Daphne #### -Файлы .service кладем в каталог /etc/systemd/system - -Проверяем путь виртуального окружения и порт в файле на соответствие с конфигурацией Nginx - -#### Запуск сервера #### -Запускаем Daphne ``` Start portaldaphne ``` -Перезагружаем Nginx ``` Restart nginx ``` \ No newline at end of file +⚠️ Оригинальный README.md не найден. \ No newline at end of file diff --git a/docs/guides/commits.md b/docs/guides/commits.md new file mode 100644 index 000000000..68716ce05 --- /dev/null +++ b/docs/guides/commits.md @@ -0,0 +1,21 @@ + + ## Заголовок должен содержать тип, номер задачи и название коммита. + Формат: <тип> [<номер задачи>]: <название> + + | Название | Описание | + |----------|----------| + | `feat` | Новый функционал | + | `fix` | Исправление ошибки | + | `docs` | Изменения в документации | + | `style` | Изменения, не влияющие на функциональность | + | `refactor` | Изменения кода, не исправляющие ошибки и не добавляющие функционал | + | `perf` | Изменения, улучшающие производительность | + | `test` | Добавление тестов | + | `chore` | Изменения в процессе сборки или вспомогательных инструментах. | + + Пример: + +```bash +feat [X-01]: я тут накоммитил +``` + \ No newline at end of file diff --git a/docs/guides/usage.md b/docs/guides/usage.md index dd2d6f3b8..686dd677a 100644 --- a/docs/guides/usage.md +++ b/docs/guides/usage.md @@ -3,12 +3,12 @@ ## Добавление комментариев для генерации документации -### Название компонента +### Описание компонента -Название компонента должно быть указано первым комментарием в теге ``: +Описание компонента должно быть указано первым комментарием в теге ``: ```html - + ``` ## Порядок структуры `
{{ errorMessage }}
{{ test.message }}