diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..b895836 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: Deploy Site + +on: + push: + branches: [ "master" ] + paths-ignore: + - README.md + - LICENSE + - docker-compose.yml + +jobs: + docker: + strategy: + matrix: + arch: [ "ubuntu-latest" ] + git-version: [ "2.44.0" ] + runs-on: ${{ matrix.arch }} + + # Steps to run + steps: + # Checkout the repo + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # Deploy to Dokku + - name: Deploy to Dokku + uses: dokku/github-action@master + with: + git_remote_url: "ssh://dokku@10.10.3.28:22/rainnny-club" + ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..5f9f341 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "trailingComma": "es5", + "tabWidth": 4 +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ac8aa26 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,49 @@ +FROM imbios/bun-node AS base + + +# Install dependencies +FROM base AS depends +WORKDIR /usr/src/app +COPY package.json* bun.lockb* ./ +RUN bun install --frozen-lockfile --quiet + + +# Build the app +FROM base AS builder +WORKDIR /usr/src/app +COPY --from=depends /usr/src/app/node_modules ./node_modules +COPY . . +ENV NEXT_TELEMETRY_DISABLED 1 + +RUN --mount=type=bind,target=/config,from=korben-splash cp /config/.env ./.env + +RUN bun run build + + +# Run the app +FROM base AS runner +WORKDIR /usr/src/app + +RUN addgroup --system --gid 1007 nextjs +RUN adduser --system --uid 1007 nextjs + +RUN mkdir .next +RUN chown nextjs:nextjs .next + +COPY --from=builder --chown=nextjs:nextjs /usr/src/app/.next/standalone ./ +COPY --from=builder --chown=nextjs:nextjs /usr/src/app/.next ./.next +COPY --from=builder --chown=nextjs:nextjs /usr/src/app/public ./public +COPY --from=builder --chown=nextjs:nextjs /usr/src/app/next.config.mjs ./next.config.mjs +COPY --from=builder --chown=nextjs:nextjs /usr/src/app/package.json ./package.json +COPY --from=builder --chown=nextjs:nextjs /usr/src/app/.env ./.env + +ENV NODE_ENV production + +# Exposting on port 80 so we can +# access via a reverse proxy for Dokku +ENV HOSTNAME "0.0.0.0" +EXPOSE 80 +ENV PORT 80 + +USER nextjs +CMD node server.js \ No newline at end of file diff --git a/README.md b/README.md index e215bc4..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,36 +0,0 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/components.json b/components.json new file mode 100644 index 0000000..c532e71 --- /dev/null +++ b/components.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": true, + "tsx": true, + "tailwind": { + "config": "tailwind.config.ts", + "css": "src/app/style/globals.css", + "baseColor": "zinc", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + } +} \ No newline at end of file diff --git a/src/app/favicon.ico b/public/favicon.ico similarity index 100% rename from src/app/favicon.ico rename to public/favicon.ico diff --git a/public/media/github.png b/public/media/github.png new file mode 100644 index 0000000..50b8175 Binary files /dev/null and b/public/media/github.png differ diff --git a/public/media/logo.png b/public/media/logo.png new file mode 100644 index 0000000..a39e7e7 Binary files /dev/null and b/public/media/logo.png differ diff --git a/src/app/layout.tsx b/src/app/(pages)/layout.tsx similarity index 100% rename from src/app/layout.tsx rename to src/app/(pages)/layout.tsx diff --git a/src/app/page.tsx b/src/app/(pages)/page.tsx similarity index 100% rename from src/app/page.tsx rename to src/app/(pages)/page.tsx diff --git a/src/app/globals.css b/src/app/style/globals.css similarity index 100% rename from src/app/globals.css rename to src/app/style/globals.css diff --git a/src/components/landing/greeting.tsx b/src/components/landing/greeting.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/components/theme-provider.tsx b/src/components/theme-provider.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx new file mode 100644 index 0000000..0270f64 --- /dev/null +++ b/src/components/ui/button.tsx @@ -0,0 +1,57 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const buttonVariants = cva( + "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", + { + variants: { + variant: { + default: + "bg-primary text-primary-foreground shadow hover:bg-primary/90", + destructive: + "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90", + outline: + "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground", + secondary: + "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-9 px-4 py-2", + sm: "h-8 rounded-md px-3 text-xs", + lg: "h-10 rounded-md px-8", + icon: "h-9 w-9", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +) + +export interface ButtonProps + extends React.ButtonHTMLAttributes, + VariantProps { + asChild?: boolean +} + +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : "button" + return ( + + ) + } +) +Button.displayName = "Button" + +export { Button, buttonVariants } diff --git a/src/lib/utils.ts b/src/lib/utils.ts new file mode 100644 index 0000000..bd0c391 --- /dev/null +++ b/src/lib/utils.ts @@ -0,0 +1,6 @@ +import { clsx, type ClassValue } from "clsx" +import { twMerge } from "tailwind-merge" + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)) +}