From f1a012d5b4c761187cd879e2d611ca51bff7c9b7 Mon Sep 17 00:00:00 2001 From: Rishi Viswanathan <128200692+risv1@users.noreply.github.com> Date: Fri, 25 Oct 2024 17:35:14 +0530 Subject: [PATCH] Revert to pnpm (#4) * refactor: use pnpm * fix: biome cmd * feat: docker fixes --- .dockerignore | 5 + Dockerfile | 24 +- Makefile | 25 +- README.md | 3 +- app/app.css | 27 + app/app.vue | 2 +- app/components/Hero.vue | 56 +- app/public/images/image.png | Bin 154712 -> 145146 bytes bun.lockb | Bin 375747 -> 0 bytes docker-compose.yml | 3 - nuxt.config.ts | 4 + package.json | 8 +- pnpm-lock.yaml | 8892 +++++++++++++++++++++++++++++++++++ server/tsconfig.json | 5 +- tsconfig.json | 3 - uno.config.ts | 35 - 16 files changed, 8983 insertions(+), 109 deletions(-) create mode 100644 .dockerignore create mode 100644 app/app.css delete mode 100755 bun.lockb create mode 100644 pnpm-lock.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8e32fca --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules +.git +.gitignore +.nuxt +dist \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 17a0e19..215302f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,17 @@ -FROM oven/bun:1.0-slim as builder +FROM node:20-slim WORKDIR /app -COPY package.json bun.lockb ./ +RUN npm install -g pnpm -RUN bun install --frozen-lockfile +COPY package.json pnpm-lock.yaml ./ -COPY . . - -RUN bun run build +RUN pnpm install -FROM oven/bun:1.0-slim - -WORKDIR /app +COPY . . -COPY --from=builder /app/.output /app/.output -COPY --from=builder /app/.nuxt /app/.nuxt -COPY --from=builder /app/package.json /app/package.json +RUN pnpm build EXPOSE 3000 -ENV NODE_ENV=production - -CMD ["bun", "run", ".output/server/index.mjs"] - - +CMD ["node", ".output/server/index.mjs"] \ No newline at end of file diff --git a/Makefile b/Makefile index 4e15b59..9ac152f 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,29 @@ run: - @bun run dev + @pnpm run dev build-client: - @bun run generate - @bunx serve .output/public + @pnpm run generate + @pnpm dlx serve .output/public + +start: + @pnpm run start build: - @bun run build - @bun .output/server/index.mjs + @pnpm run build + @node .output/server/index.mjs format: - @bunx biome format --write ./app ./server + @pnpm biome format --write ./app ./server lint: - @bunx biome lint --write ./app ./server + @pnpm biome lint --write ./app ./server upgrade-deps: @ncu -u - @bun i \ No newline at end of file + @pnpm i + +up: + @docker compose up -d + +down: + @docker compose down -v \ No newline at end of file diff --git a/README.md b/README.md index 36ebebd..c6739c8 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,12 @@ # Nuxt 3 Starter Template -A modern Nuxt 3 starter template with Drizzle ORM, Biome, Pinia, Docker, UnoCSS and Bun. This template provides a robust foundation for building full-stack applications with best practices and powerful tools. +A modern Nuxt 3 starter template with Drizzle ORM, Biome, Pinia, Docker, and UnoCSS. This template provides a robust foundation for building full-stack applications with best practices and powerful tools. ## 🚀 Stack ![Nuxt 3 Starter Template](app/public/images/image.png) - **[Nuxt 3](https://nuxt.com/)** - The Intuitive Vue Framework -- **[Bun](https://bun.sh/)** - Fast JavaScript runtime & package manager - **[UnoCSS](https://unocss.dev/)** - Instant On-demand Atomic CSS Engine - **[Drizzle ORM](https://orm.drizzle.team/)** - TypeScript ORM with powerful migrations - **[Biome](https://biomejs.dev/)** - Fast linter and formatter diff --git a/app/app.css b/app/app.css new file mode 100644 index 0000000..02d1843 --- /dev/null +++ b/app/app.css @@ -0,0 +1,27 @@ +@font-face { + font-family: 'Satoshi-Variable'; + src: url('/fonts/Satoshi-Variable.ttf') format('trueType'); + font-weight: 100 900; + font-style: normal; + font-display: swap; +} + +body { + margin: 0; + padding: 0; +} + +.border { + border-width: 1px; + border-style: solid; +} + +.border-2 { + border-width: 2px; + border-style: solid; +} + +.border-4 { + border-width: 4px; + border-style: solid; +} \ No newline at end of file diff --git a/app/app.vue b/app/app.vue index dc65fba..c8a111e 100644 --- a/app/app.vue +++ b/app/app.vue @@ -1,5 +1,5 @@