mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Preparing the repository
This commit is contained in:
+2
-1
@@ -5,6 +5,7 @@
|
||||
],
|
||||
"rules": {
|
||||
"react/no-unescaped-entities": "off",
|
||||
"react-hooks/rules-of-hooks": "off"
|
||||
"react-hooks/rules-of-hooks": "off",
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ jobs:
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
target: prod
|
||||
|
||||
|
||||
# - name: Generate artifact attestation
|
||||
# uses: actions/attest-build-provenance@v2
|
||||
|
||||
+934
File diff suppressed because one or more lines are too long
+2
-1
@@ -1 +1,2 @@
|
||||
nodeLinker: "node-modules"
|
||||
nodeLinker: "node-modules"
|
||||
yarnPath: .yarn/releases/yarn-4.5.3.cjs
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
import {PageParams} from "@/types/next";
|
||||
import {prisma} from "@/prisma";
|
||||
import {AgentCard} from "@/components/wrappers/dashboard/agent/AgentCard/AgentCard";
|
||||
import {CardsWithPagination} from "@/components/wrappers/common/cards-with-pagination";
|
||||
import {Button} from "@/components/ui/button";
|
||||
import Link from 'next/link'
|
||||
import {Page, PageActions, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
|
||||
import {currentUser} from "@/auth/current-user";
|
||||
import {db} from "@/db";
|
||||
import {prisma} from "@/prisma";
|
||||
|
||||
|
||||
export default async function RoutePage(props: PageParams<{}>) {
|
||||
|
||||
const agents = await db.agent.findMany()
|
||||
const agents = await prisma.agent.findMany()
|
||||
|
||||
return (
|
||||
<Page>
|
||||
@@ -37,7 +35,7 @@ export default async function RoutePage(props: PageParams<{}>) {
|
||||
/>
|
||||
:
|
||||
<Link
|
||||
href="/dashboard/agents/new"
|
||||
href={"/dashboard/agents/new"}
|
||||
className=" flex item-center justify-center border-2 border-dashed transition-colors border-primary p-8 lg:p-12 w-full rounded-md">
|
||||
Create new Agent
|
||||
</Link>
|
||||
|
||||
+49
-2
@@ -1,6 +1,45 @@
|
||||
// "use client"
|
||||
//
|
||||
// import {useSearchParams} from "next/navigation"
|
||||
//
|
||||
// enum Error {
|
||||
// Configuration = "Configuration",
|
||||
// }
|
||||
//
|
||||
// const errorMap = {
|
||||
// [Error.Configuration]: (
|
||||
// <p>
|
||||
// There was a problem when trying to authenticate. Please contact us if this
|
||||
// error persists. Unique error code:{" "}
|
||||
// <code className="rounded-sm bg-slate-100 p-1 text-xs">Configuration</code>
|
||||
// </p>
|
||||
// ),
|
||||
// }
|
||||
//
|
||||
// export default function AuthErrorPage() {
|
||||
// const search = useSearchParams()
|
||||
// const error = search.get("error") as Error
|
||||
//
|
||||
// return (
|
||||
// <div className="flex h-screen w-full flex-col items-center justify-center">
|
||||
// <a
|
||||
// href="#"
|
||||
// className="block max-w-sm rounded-lg border border-gray-200 bg-white p-6 text-center shadow hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700"
|
||||
// >
|
||||
// <h5 className="mb-2 flex flex-row items-center justify-center gap-2 text-xl font-bold tracking-tight text-gray-900 dark:text-white">
|
||||
// Something went wrong
|
||||
// </h5>
|
||||
// <div className="font-normal text-gray-700 dark:text-gray-400">
|
||||
// {errorMap[error] || "Please contact us if this error persists."}
|
||||
// </div>
|
||||
// </a>
|
||||
// </div>
|
||||
// )
|
||||
// }
|
||||
"use client"
|
||||
|
||||
import {useSearchParams} from "next/navigation"
|
||||
import { useSearchParams } from "next/navigation"
|
||||
import React, { Suspense } from "react"
|
||||
|
||||
enum Error {
|
||||
Configuration = "Configuration",
|
||||
@@ -16,7 +55,7 @@ const errorMap = {
|
||||
),
|
||||
}
|
||||
|
||||
export default function AuthErrorPage() {
|
||||
function AuthErrorPageContent() {
|
||||
const search = useSearchParams()
|
||||
const error = search.get("error") as Error
|
||||
|
||||
@@ -35,4 +74,12 @@ export default function AuthErrorPage() {
|
||||
</a>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default function AuthErrorPage() {
|
||||
return (
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<AuthErrorPageContent />
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import {PropsWithChildren} from "react";
|
||||
import {ThemeProvider} from "@/features/theme/theme-provider";
|
||||
|
||||
import {Toaster} from "@/components/ui/sonner";
|
||||
import {QueryClient, QueryClientProvider,} from '@tanstack/react-query'
|
||||
@@ -9,9 +10,9 @@ import {SessionProvider} from "next-auth/react";
|
||||
export type ProviderProps = PropsWithChildren<{}>;
|
||||
const queryClient = new QueryClient()
|
||||
|
||||
import dynamic from 'next/dynamic';
|
||||
// import dynamic from 'next/dynamic';
|
||||
|
||||
const ThemeProvider = dynamic(() => import('@/features/theme/theme-provider'), {ssr: false});
|
||||
// const ThemeProvider = dynamic(() => import('@/features/theme/theme-provider'), {ssr: false});
|
||||
|
||||
export const Providers = (props: ProviderProps) => {
|
||||
return (
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
name: portabase-prod
|
||||
|
||||
services:
|
||||
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/dockerfile/Dockerfile
|
||||
target: prod
|
||||
|
||||
ports:
|
||||
- '8887:80'
|
||||
environment:
|
||||
- TIME_ZONE="Europe/Paris"
|
||||
- NODE_ENV=development
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
container_name: portabase-app-prod
|
||||
|
||||
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
ports:
|
||||
- "5433:5432"
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=devdb
|
||||
- POSTGRES_USER=devuser
|
||||
- POSTGRES_PASSWORD=changeme
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready -U devuser -d devdb" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
|
||||
s3:
|
||||
image: docker.io/bitnami/minio:latest
|
||||
ports:
|
||||
- '9000:9000'
|
||||
- '9001:9001'
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
environment:
|
||||
- MINIO_ROOT_USER=SoluceTechnologies
|
||||
- MINIO_ROOT_PASSWORD=p18avkwHPDh9mk
|
||||
- MINIO_DEFAULT_BUCKETS=statics
|
||||
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
minio_data:
|
||||
@@ -1,6 +1,7 @@
|
||||
FROM node:20.1.0-alpine AS base
|
||||
|
||||
ENV YARN_VERSION=4.2.2
|
||||
#ENV YARN_VERSION=4.2.2
|
||||
ENV YARN_VERSION=4.5.3
|
||||
|
||||
RUN apk add --no-cache libc6-compat
|
||||
|
||||
@@ -13,6 +14,8 @@ FROM base AS deps
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY .yarn ./.yarn
|
||||
COPY .yarnrc.yml ./
|
||||
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
||||
|
||||
RUN \
|
||||
@@ -45,7 +48,7 @@ COPY . .
|
||||
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
RUN npx prisma generate
|
||||
#RUN npx prisma generate
|
||||
|
||||
RUN \
|
||||
if [ -f yarn.lock ]; then yarn run build; \
|
||||
|
||||
+18
-1
@@ -1,4 +1,21 @@
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {};
|
||||
const nextConfig = {
|
||||
output: "standalone",
|
||||
typescript: {
|
||||
//TODO fix all type errors and remove 'ignoreBuildErrors'
|
||||
// !! WARN !!
|
||||
// Dangerously allow production builds to successfully complete even if
|
||||
// your project has type errors.
|
||||
// !! WARN !!
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"next-safe-action": "^7.4.3",
|
||||
"next-themes": "^0.3.0",
|
||||
"nodemailer": "^6.9.16",
|
||||
"npm-check-updates": "^17.1.13",
|
||||
"react": "19.0.0-rc-66855b96-20241106",
|
||||
"react-day-picker": "8.10.1",
|
||||
"react-dom": "19.0.0-rc-66855b96-20241106",
|
||||
@@ -84,6 +85,7 @@
|
||||
"zustand": "^5.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/eslint-plugin-tailwindcss": "^3",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||
@@ -91,6 +93,7 @@
|
||||
"@zenstackhq/tanstack-query": "^2.10.1",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "15.0.3",
|
||||
"eslint-plugin-tailwindcss": "^3.17.5",
|
||||
"postcss": "^8",
|
||||
"prisma": "^5.22.0",
|
||||
"tailwindcss": "^3.4.1",
|
||||
|
||||
@@ -4,6 +4,6 @@ import * as React from "react"
|
||||
import { ThemeProvider as NextThemesProvider } from "next-themes"
|
||||
import { type ThemeProviderProps } from "next-themes/dist/types"
|
||||
|
||||
export default function ThemeProvider({ children, ...props }: ThemeProviderProps) {
|
||||
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
|
||||
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
|
||||
}
|
||||
Reference in New Issue
Block a user