diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index c5ea0d4..0000000 --- a/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -dist/ -npm-debug.log diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index b1d64b5..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - extends: [ - 'plugin:vue/vue3-essential', - 'prettier', - // 'airbnb-base', - 'plugin:import/typescript' - ], - rules: { - // override/add rules settings here, such as: - 'vue/no-unused-vars': 'error', - 'vue/multi-word-component-names': 'off', - }, -} diff --git a/.gitignore b/.gitignore index 7329a85..239c57c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,83 @@ -# build output -dist/ -.output/ - -# dependencies -node_modules/ - -# logs +# Logs and databases # +###################### +*.log +*.sql +*.sqlite +*.db +*.sqlite-journal +/logs npm-debug.log* yarn-debug.log* yarn-error.log* -pnpm-debug.log* - -# environment variables -.env -.env.production - -# macOS-specific files +# OS generated files # +###################### .DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# helmsman generated tmp folder +.helmsman-tmp + +# Coverage directory used by tools like istanbul +coverage + +# Dependency directories +node_modules/ +jspm_packages/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# Nuxt +*.log* +.nuxt +.nitro +.cache +.output +.env +dist + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless + +# IDE / Editor +.idea + +# Service worker +sw.* + +# Vim swap files +*.swp + +# Auto generate on postinstall step +auto-imports.d.ts +components.d.ts diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index ad6c3f5..0000000 --- a/.prettierrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - semi: false, - tabWidth: 2, - useTabs: false, - printWidth: 80, - endOfLine: 'auto', - singleQuote: true, - trailingComma: 'es5', - bracketSpacing: true, - arrowParens: 'always', -} diff --git a/Dockerfile b/Dockerfile index d63e6e6..9f01411 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,39 @@ -FROM node:18-alpine as develop-stage -WORKDIR /app -COPY package*.json ./ -RUN npm install -COPY . . +# see https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact +ARG NODE_VERSION=node:16.14.2 -FROM develop-stage as build-stage +FROM $NODE_VERSION AS dependency-base + +# create destination directory +RUN mkdir -p /app +WORKDIR /app + +# copy the app, note .dockerignore +COPY package.json . +COPY package-lock.json . +RUN npm ci + +FROM dependency-base AS production-base + +# build will also take care of building +# if necessary +COPY . . RUN npm run build -FROM nginx:1.15.7-alpine as production-stage -COPY --from=build-stage /app/dist /usr/share/nginx/html -EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] +FROM $NODE_VERSION AS production + +COPY --from=production-base /app/.output /app/.output + +# Service hostname +ENV NUXT_HOST=0.0.0.0 + +# Service version +ARG NUXT_APP_VERSION +ENV NUXT_APP_VERSION=${NUXT_APP_VERSION} + +ENV DATABASE_URL=file:./db.sqlite + +# Run in production mode +ENV NODE_ENV=production + +# start the app +CMD [ "node", "/app/.output/server/index.mjs" ] diff --git a/License b/License deleted file mode 100644 index 9d81d27..0000000 --- a/License +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 Shamim Hossain - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index d393cb4..a41fa86 100644 --- a/README.md +++ b/README.md @@ -1,90 +1,7 @@ # TODO -0. anim pegaz create ?? -1. presentation de l'arborecense - doc du code -2. command line guide - doc du CLI -3. configuration file ? +- [ ] anim pegaz create ?? +- [ ] presentation de l'arborecense - doc du code +- [ ] command line guide - doc du CLI +- [ ] configuration file ? -# vue-3-stackter - -![Cover Image](https://raw.githubusercontent.com/shamscorner/images/main/vite-vue-3-tailwind.png) - -A Vue3 starter project setup with these following components, - -- [Vite](https://vitejs.dev/) -- vue-meta-3.0.0-alpha.8 -- Router -- [Pinia](https://pinia.vuejs.org/) (Vue 3 default) -- Eslint -- Prettier -- [Tailwind CSS](https://tailwindcss.com/) -- File based routing with [vite-plugin-pages](https://github.com/hannoeru/vite-plugin-pages). (Like [Nuxt file system routing](https://nuxtjs.org/docs/2.x/features/file-system-routing)) -- Layout system with [vite-plugin-vue-layouts](https://github.com/JohnCampionJr/vite-plugin-vue-layouts). (Like [Nuxt layouts](https://nuxtjs.org/docs/2.x/directory-structure/layouts)) -- Components auto importing with [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) -- `~/` alias for `/src`. So we don't have to write something like `../../../SomeModule` to import modules. -- and some custom setups. - -[Check out Typescript version here](https://github.com/shamscorner/vitesse-stackter-clean-architect) - -### Run this project: - -``` -yarn -yarn dev -``` - -### Change site name - -In `App.vue` change the following, - -```Javascript -const siteName = 'Vite App' // add your site name here -``` - -### Layouts - -You can add layouts in your project if you want. You will find `default.vue` and `404.vue` layout examples in this project. For more details, check out [vite-plugin-vue-layouts](https://github.com/JohnCampionJr/vite-plugin-vue-layouts). (Like [Nuxt layouts](https://nuxtjs.org/docs/2.x/directory-structure/layouts) system). - -### Pages - -You can add pages to your project. You will find some example pages in the `pages` directory (`index.vue`, `about/[name].vue`, and `[...all].vue`). For more details, check out [vite-plugin-pages](https://github.com/hannoeru/vite-plugin-pages). (Like [Nuxt file system routing](https://nuxtjs.org/docs/2.x/features/file-system-routing)). - -### Meta info - -You can add meta information in your pages. Here is an example, - -```Javascript - -``` - -## Recommended IDE Setup - -[VSCode](https://code.visualstudio.com/) + [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur). Make sure to enable `vetur.experimental.templateInterpolationService` in settings! - -### If Using ` + + diff --git a/src/components/backup-restore.vue b/components/backup-restore.vue similarity index 53% rename from src/components/backup-restore.vue rename to components/backup-restore.vue index e5ae428..a032a8e 100644 --- a/src/components/backup-restore.vue +++ b/components/backup-restore.vue @@ -1,13 +1,5 @@