From 2b300bf7070e981d808ddb17e4aa8cd10148c479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Szyma=C5=84ski?= Date: Mon, 6 May 2024 10:40:16 +0200 Subject: [PATCH] build(app): directory refactor --- .github/dependabot.yml | 2 +- .github/workflows/deploy.yml | 9 ++++++--- .gitignore | 6 +++--- app.vue => app/app.vue | 0 app/{ => app_}/router.options.ts | 0 {assets => app/assets}/css/tailwind.css | 0 .../font/inter-v13-latin_latin-ext-300.woff2 | Bin .../font/inter-v13-latin_latin-ext-700.woff2 | Bin .../inter-v13-latin_latin-ext-regular.woff2 | Bin {assets => app/assets}/font/mnt_b.woff | Bin {assets => app/assets}/font/mnt_l.woff | Bin .../components}/button/Account.vue | 0 {components => app/components}/button/Base.vue | 0 {components => app/components}/button/Link.vue | 0 .../components}/header/Dashboard.vue | 0 {components => app/components}/header/Form.vue | 0 {components => app/components}/icon/Header.vue | 0 .../components}/icon/Instagram.vue | 0 {components => app/components}/icon/Logo.vue | 0 {components => app/components}/icon/Logout.vue | 0 {components => app/components}/icon/User.vue | 0 {components => app/components}/input/Base.vue | 0 .../components}/match/Controls.vue | 0 .../components}/select/Locale.vue | 0 crowdin.yml => app/crowdin.yml | 0 error.vue => app/error.vue | 0 i18n.config.ts => app/i18n.config.ts | 0 {middleware => app/middleware}/auth.ts | 0 {middleware => app/middleware}/query.ts | 0 nuxt.config.ts => app/nuxt.config.ts | 7 +------ package-lock.json => app/package-lock.json | 0 package.json => app/package.json | 0 {pages => app/pages}/index.vue | 3 +-- {pages_disabled => app/pages_disabled}/auth.vue | 0 .../pages_disabled}/auth/index.vue | 0 .../pages_disabled}/auth/login.vue | 0 .../pages_disabled}/auth/recovery.vue | 0 .../pages_disabled}/auth/register.vue | 0 .../pages_disabled}/auth/reset.vue | 0 .../pages_disabled}/dashboard.vue | 0 .../pages_disabled}/dashboard/account/index.vue | 0 .../dashboard/account/settings.vue | 0 .../dashboard/admin/matches/index.vue | 0 .../pages_disabled}/dashboard/index.vue | 0 .../pages_disabled}/dashboard/invite/index.vue | 0 .../dashboard/leaderboard/index.vue | 0 .../pages_disabled}/dashboard/live/index.vue | 0 .../dashboard/players/[name]/index.vue | 0 .../pages_disabled}/dashboard/players/index.vue | 0 .../dashboard/schedule/index.vue | 0 .../dashboard/standings/index.vue | 0 .../dashboard/teams/[team]/index.vue | 0 .../pages_disabled}/dashboard/teams/index.vue | 0 .../pages_disabled}/match/[match].vue | 0 .../pages_disabled}/match/index.vue | 0 .../pages_disabled}/support.vue | 0 postcss.config.ts => app/postcss.config.ts | 0 .../public}/favicon/apple-touch-icon.png | Bin .../public}/favicon/favicon-16x16.png | Bin .../public}/favicon/favicon-192x192.png | Bin .../public}/favicon/favicon-32x32.png | Bin .../favicon/favicon-512x512-maskable.png | Bin .../public}/favicon/favicon-512x512.png | Bin {public => app/public}/favicon/favicon.ico | Bin {public => app/public}/favicon/favicon.svg | 0 {public => app/public}/robots.txt | 0 {public => app/public}/sitemap.xml | 0 {server => app/server}/api/form.post.ts | 0 .../server}/api_disabled/auth/index.get.ts | 0 .../server}/api_disabled/auth/login.post.ts | 0 .../server}/api_disabled/auth/recovery.post.ts | 0 .../server}/api_disabled/auth/register.post.ts | 0 .../server}/api_disabled/auth/reset.post.ts | 0 .../server}/api_disabled/auth/verify.get.ts | 0 {server => app/server}/tsconfig.json | 0 tailwind.config.ts => app/tailwind.config.ts | 0 tsconfig.json => app/tsconfig.json | 0 {types => app/types}/index.d.ts | 0 {utils => app/utils}/errorRedirect.ts | 0 {utils => app/utils}/formatHours.ts | 0 {utils => app/utils}/formatMinutes.ts | 0 {utils => app/utils}/formatTime.ts | 0 {utils => app/utils}/getInputType.ts | 0 {utils => app/utils}/getPath.ts | 0 {utils => app/utils}/validateData.ts | 0 Dockerfile => config/app/Dockerfile | 8 +++++++- docker-compose.yml | 16 ++++++++++++++++ 87 files changed, 35 insertions(+), 16 deletions(-) rename app.vue => app/app.vue (100%) rename app/{ => app_}/router.options.ts (100%) rename {assets => app/assets}/css/tailwind.css (100%) rename {assets => app/assets}/font/inter-v13-latin_latin-ext-300.woff2 (100%) rename {assets => app/assets}/font/inter-v13-latin_latin-ext-700.woff2 (100%) rename {assets => app/assets}/font/inter-v13-latin_latin-ext-regular.woff2 (100%) rename {assets => app/assets}/font/mnt_b.woff (100%) rename {assets => app/assets}/font/mnt_l.woff (100%) rename {components => app/components}/button/Account.vue (100%) rename {components => app/components}/button/Base.vue (100%) rename {components => app/components}/button/Link.vue (100%) rename {components => app/components}/header/Dashboard.vue (100%) rename {components => app/components}/header/Form.vue (100%) rename {components => app/components}/icon/Header.vue (100%) rename {components => app/components}/icon/Instagram.vue (100%) rename {components => app/components}/icon/Logo.vue (100%) rename {components => app/components}/icon/Logout.vue (100%) rename {components => app/components}/icon/User.vue (100%) rename {components => app/components}/input/Base.vue (100%) rename {components => app/components}/match/Controls.vue (100%) rename {components => app/components}/select/Locale.vue (100%) rename crowdin.yml => app/crowdin.yml (100%) rename error.vue => app/error.vue (100%) rename i18n.config.ts => app/i18n.config.ts (100%) rename {middleware => app/middleware}/auth.ts (100%) rename {middleware => app/middleware}/query.ts (100%) rename nuxt.config.ts => app/nuxt.config.ts (97%) rename package-lock.json => app/package-lock.json (100%) rename package.json => app/package.json (100%) rename {pages => app/pages}/index.vue (97%) rename {pages_disabled => app/pages_disabled}/auth.vue (100%) rename {pages_disabled => app/pages_disabled}/auth/index.vue (100%) rename {pages_disabled => app/pages_disabled}/auth/login.vue (100%) rename {pages_disabled => app/pages_disabled}/auth/recovery.vue (100%) rename {pages_disabled => app/pages_disabled}/auth/register.vue (100%) rename {pages_disabled => app/pages_disabled}/auth/reset.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/account/index.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/account/settings.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/admin/matches/index.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/index.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/invite/index.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/leaderboard/index.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/live/index.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/players/[name]/index.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/players/index.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/schedule/index.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/standings/index.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/teams/[team]/index.vue (100%) rename {pages_disabled => app/pages_disabled}/dashboard/teams/index.vue (100%) rename {pages_disabled => app/pages_disabled}/match/[match].vue (100%) rename {pages_disabled => app/pages_disabled}/match/index.vue (100%) rename {pages_disabled => app/pages_disabled}/support.vue (100%) rename postcss.config.ts => app/postcss.config.ts (100%) rename {public => app/public}/favicon/apple-touch-icon.png (100%) rename {public => app/public}/favicon/favicon-16x16.png (100%) rename {public => app/public}/favicon/favicon-192x192.png (100%) rename {public => app/public}/favicon/favicon-32x32.png (100%) rename {public => app/public}/favicon/favicon-512x512-maskable.png (100%) rename {public => app/public}/favicon/favicon-512x512.png (100%) rename {public => app/public}/favicon/favicon.ico (100%) rename {public => app/public}/favicon/favicon.svg (100%) rename {public => app/public}/robots.txt (100%) rename {public => app/public}/sitemap.xml (100%) rename {server => app/server}/api/form.post.ts (100%) rename {server => app/server}/api_disabled/auth/index.get.ts (100%) rename {server => app/server}/api_disabled/auth/login.post.ts (100%) rename {server => app/server}/api_disabled/auth/recovery.post.ts (100%) rename {server => app/server}/api_disabled/auth/register.post.ts (100%) rename {server => app/server}/api_disabled/auth/reset.post.ts (100%) rename {server => app/server}/api_disabled/auth/verify.get.ts (100%) rename {server => app/server}/tsconfig.json (100%) rename tailwind.config.ts => app/tailwind.config.ts (100%) rename tsconfig.json => app/tsconfig.json (100%) rename {types => app/types}/index.d.ts (100%) rename {utils => app/utils}/errorRedirect.ts (100%) rename {utils => app/utils}/formatHours.ts (100%) rename {utils => app/utils}/formatMinutes.ts (100%) rename {utils => app/utils}/formatTime.ts (100%) rename {utils => app/utils}/getInputType.ts (100%) rename {utils => app/utils}/getPath.ts (100%) rename {utils => app/utils}/validateData.ts (100%) rename Dockerfile => config/app/Dockerfile (59%) create mode 100644 docker-compose.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 539ba93..a1b271c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,6 @@ version: 2 updates: - package-ecosystem: "npm" - directory: "/" + directory: "/app" schedule: interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cf39202..00856c8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -38,11 +38,14 @@ jobs: - name: Push Docker image uses: docker/build-push-action@v5 with: - context: . - platforms: linux/amd64,linux/arm64 push: true + context: ./config/app + file: ./config/app/Dockerfile + platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + "NUXT_MAIL_URL=${{ secrets.MAIL_URL }}" deploy: name: Deploy Docker to a Linux instance runs-on: ubuntu-latest @@ -57,4 +60,4 @@ jobs: password: ${{ secrets.SERVER_PASSWORD }} port: ${{ secrets.SERVER_PORT }} key: ${{ secrets.SERVER_KEY }} - script: ${{ vars.SCRIPT }} ${{ github.repository }} ${{ secrets.APP_NAME }} ${{ secrets.APP_PORT }} + script: ${{ vars.SCRIPT }} ${{ github.repository }} ${{ secrets.APP_NAME }} ${{ secrets.APP_PORT }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7eaa50a..257d6aa 100644 --- a/.gitignore +++ b/.gitignore @@ -14,9 +14,6 @@ logs *.log # Misc -.DS_Store -.fleet -.idea # Local env files .env @@ -30,3 +27,6 @@ sw.* # Development .vscode +.DS_Store +.fleet +.idea diff --git a/app.vue b/app/app.vue similarity index 100% rename from app.vue rename to app/app.vue diff --git a/app/router.options.ts b/app/app_/router.options.ts similarity index 100% rename from app/router.options.ts rename to app/app_/router.options.ts diff --git a/assets/css/tailwind.css b/app/assets/css/tailwind.css similarity index 100% rename from assets/css/tailwind.css rename to app/assets/css/tailwind.css diff --git a/assets/font/inter-v13-latin_latin-ext-300.woff2 b/app/assets/font/inter-v13-latin_latin-ext-300.woff2 similarity index 100% rename from assets/font/inter-v13-latin_latin-ext-300.woff2 rename to app/assets/font/inter-v13-latin_latin-ext-300.woff2 diff --git a/assets/font/inter-v13-latin_latin-ext-700.woff2 b/app/assets/font/inter-v13-latin_latin-ext-700.woff2 similarity index 100% rename from assets/font/inter-v13-latin_latin-ext-700.woff2 rename to app/assets/font/inter-v13-latin_latin-ext-700.woff2 diff --git a/assets/font/inter-v13-latin_latin-ext-regular.woff2 b/app/assets/font/inter-v13-latin_latin-ext-regular.woff2 similarity index 100% rename from assets/font/inter-v13-latin_latin-ext-regular.woff2 rename to app/assets/font/inter-v13-latin_latin-ext-regular.woff2 diff --git a/assets/font/mnt_b.woff b/app/assets/font/mnt_b.woff similarity index 100% rename from assets/font/mnt_b.woff rename to app/assets/font/mnt_b.woff diff --git a/assets/font/mnt_l.woff b/app/assets/font/mnt_l.woff similarity index 100% rename from assets/font/mnt_l.woff rename to app/assets/font/mnt_l.woff diff --git a/components/button/Account.vue b/app/components/button/Account.vue similarity index 100% rename from components/button/Account.vue rename to app/components/button/Account.vue diff --git a/components/button/Base.vue b/app/components/button/Base.vue similarity index 100% rename from components/button/Base.vue rename to app/components/button/Base.vue diff --git a/components/button/Link.vue b/app/components/button/Link.vue similarity index 100% rename from components/button/Link.vue rename to app/components/button/Link.vue diff --git a/components/header/Dashboard.vue b/app/components/header/Dashboard.vue similarity index 100% rename from components/header/Dashboard.vue rename to app/components/header/Dashboard.vue diff --git a/components/header/Form.vue b/app/components/header/Form.vue similarity index 100% rename from components/header/Form.vue rename to app/components/header/Form.vue diff --git a/components/icon/Header.vue b/app/components/icon/Header.vue similarity index 100% rename from components/icon/Header.vue rename to app/components/icon/Header.vue diff --git a/components/icon/Instagram.vue b/app/components/icon/Instagram.vue similarity index 100% rename from components/icon/Instagram.vue rename to app/components/icon/Instagram.vue diff --git a/components/icon/Logo.vue b/app/components/icon/Logo.vue similarity index 100% rename from components/icon/Logo.vue rename to app/components/icon/Logo.vue diff --git a/components/icon/Logout.vue b/app/components/icon/Logout.vue similarity index 100% rename from components/icon/Logout.vue rename to app/components/icon/Logout.vue diff --git a/components/icon/User.vue b/app/components/icon/User.vue similarity index 100% rename from components/icon/User.vue rename to app/components/icon/User.vue diff --git a/components/input/Base.vue b/app/components/input/Base.vue similarity index 100% rename from components/input/Base.vue rename to app/components/input/Base.vue diff --git a/components/match/Controls.vue b/app/components/match/Controls.vue similarity index 100% rename from components/match/Controls.vue rename to app/components/match/Controls.vue diff --git a/components/select/Locale.vue b/app/components/select/Locale.vue similarity index 100% rename from components/select/Locale.vue rename to app/components/select/Locale.vue diff --git a/crowdin.yml b/app/crowdin.yml similarity index 100% rename from crowdin.yml rename to app/crowdin.yml diff --git a/error.vue b/app/error.vue similarity index 100% rename from error.vue rename to app/error.vue diff --git a/i18n.config.ts b/app/i18n.config.ts similarity index 100% rename from i18n.config.ts rename to app/i18n.config.ts diff --git a/middleware/auth.ts b/app/middleware/auth.ts similarity index 100% rename from middleware/auth.ts rename to app/middleware/auth.ts diff --git a/middleware/query.ts b/app/middleware/query.ts similarity index 100% rename from middleware/query.ts rename to app/middleware/query.ts diff --git a/nuxt.config.ts b/app/nuxt.config.ts similarity index 97% rename from nuxt.config.ts rename to app/nuxt.config.ts index a560b40..3000bc5 100644 --- a/nuxt.config.ts +++ b/app/nuxt.config.ts @@ -9,12 +9,7 @@ export default defineNuxtConfig({ dirs: ["types"], }, runtimeConfig: { - apiKey: "", - token: "", - mailHost: "", - mailPort: "", - mailUser: "", - mailPassword: "", + mailUlrl: "", public: { name: "Knury Knurów", version: "0.1.0", diff --git a/package-lock.json b/app/package-lock.json similarity index 100% rename from package-lock.json rename to app/package-lock.json diff --git a/package.json b/app/package.json similarity index 100% rename from package.json rename to app/package.json diff --git a/pages/index.vue b/app/pages/index.vue similarity index 97% rename from pages/index.vue rename to app/pages/index.vue index 8d9f6ab..12975a5 100644 --- a/pages/index.vue +++ b/app/pages/index.vue @@ -151,8 +151,7 @@ const register = async () => {

Rejestracja drużyny

- Aby zapisać swoją drużynę na turniej koszykówki ulicznej Knurowski Streetball Kapitan musi wypełnienić - formularz, a następnie potwierdzić go drogą e-mail. + Turniej odbędzie się 25 Maja 2024 na Kompleksie Boisk "Orlik" przy ulicy Ułanów 8 w Knurowie. Aby zapisać swoją drużynę na turniej koszykówki ulicznej Knurowski Streetball Kapitan musi wypełnienić formularz, a następnie potwierdzić go drogą e-mail. Wymogiem rejestracji jest akceptacja