Gmagl commited on
Commit
cd96cb4
·
1 Parent(s): 804b1e6

Fix: Optimized for HF Spaces

Browse files
Files changed (3) hide show
  1. Dockerfile +16 -13
  2. next.config.ts +4 -8
  3. package.json +8 -48
Dockerfile CHANGED
@@ -2,33 +2,36 @@ FROM node:20-alpine
2
 
3
  WORKDIR /app
4
 
5
- # Instalar bun
 
 
 
6
  RUN npm install -g bun
7
 
8
- # Copiar archivos de dependencias
9
- COPY package.json bun.lock ./
10
 
11
- # Instalar dependencias
12
- RUN bun install
13
 
14
- # Copiar el resto de archivos
15
  COPY . .
16
 
17
- # Generar Prisma client
18
  RUN bunx prisma generate
19
 
20
- # Crear directorio de datos
 
 
 
21
  RUN mkdir -p /app/data
22
 
23
- # Variables de entorno
24
  ENV NODE_ENV=production
25
  ENV DATABASE_URL="file:/app/data/sofia.db"
26
  ENV PORT=3000
27
  ENV HOST=0.0.0.0
28
 
29
- # Build
30
- RUN bun run build
31
-
32
  EXPOSE 3000
33
 
34
- CMD ["bun", "start"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install dependencies for native modules
6
+ RUN apk add --no-cache libc6-compat
7
+
8
+ # Install bun
9
  RUN npm install -g bun
10
 
11
+ # Copy package files
12
+ COPY package.json bun.lock* ./
13
 
14
+ # Install dependencies
15
+ RUN bun install --frozen-lockfile || bun install
16
 
17
+ # Copy source files
18
  COPY . .
19
 
20
+ # Generate Prisma client
21
  RUN bunx prisma generate
22
 
23
+ # Build the application
24
+ RUN bun run build
25
+
26
+ # Create data directory
27
  RUN mkdir -p /app/data
28
 
29
+ # Environment variables
30
  ENV NODE_ENV=production
31
  ENV DATABASE_URL="file:/app/data/sofia.db"
32
  ENV PORT=3000
33
  ENV HOST=0.0.0.0
34
 
 
 
 
35
  EXPOSE 3000
36
 
37
+ CMD ["bun", "run", "start"]
next.config.ts CHANGED
@@ -1,12 +1,8 @@
1
- import type { NextConfig } from "next";
2
 
3
- const nextConfig: NextConfig = {
4
  output: "standalone",
5
- /* config options here */
6
- typescript: {
7
- ignoreBuildErrors: true,
8
- },
9
- reactStrictMode: false,
10
- };
11
 
12
  export default nextConfig;
 
1
+ import type {{ NextConfig }} from "next";
2
 
3
+ const nextConfig: NextConfig = {{
4
  output: "standalone",
5
+ reactStrictMode: true,
6
+ }};
 
 
 
 
7
 
8
  export default nextConfig;
package.json CHANGED
@@ -1,40 +1,25 @@
1
  {
2
- "name": "nextjs_tailwind_shadcn_ts",
3
- "version": "0.2.0",
4
  "private": true,
5
  "scripts": {
6
- "dev": "next dev -p 3000 -H 0.0.0.0 2>&1 | tee dev.log",
7
- "build": "next build && cp -r .next/static .next/standalone/.next/ && cp -r public .next/standalone/",
8
- "start": "NODE_ENV=production bun .next/standalone/server.js 2>&1 | tee server.log",
9
- "lint": "eslint .",
10
- "db:push": "prisma db push",
11
- "db:generate": "prisma generate",
12
- "db:migrate": "prisma migrate dev",
13
- "db:reset": "prisma migrate reset"
14
  },
15
  "dependencies": {
16
- "@dnd-kit/core": "^6.3.1",
17
- "@dnd-kit/sortable": "^10.0.0",
18
- "@dnd-kit/utilities": "^3.2.2",
19
  "@hookform/resolvers": "^5.1.1",
20
- "@mdxeditor/editor": "^3.39.1",
21
  "@prisma/client": "^6.11.1",
22
  "@radix-ui/react-accordion": "^1.2.11",
23
  "@radix-ui/react-alert-dialog": "^1.1.14",
24
- "@radix-ui/react-aspect-ratio": "^1.1.7",
25
  "@radix-ui/react-avatar": "^1.1.10",
26
  "@radix-ui/react-checkbox": "^1.3.2",
27
- "@radix-ui/react-collapsible": "^1.1.11",
28
- "@radix-ui/react-context-menu": "^2.2.15",
29
  "@radix-ui/react-dialog": "^1.1.14",
30
  "@radix-ui/react-dropdown-menu": "^2.1.15",
31
- "@radix-ui/react-hover-card": "^1.1.14",
32
  "@radix-ui/react-label": "^2.1.7",
33
- "@radix-ui/react-menubar": "^1.1.15",
34
- "@radix-ui/react-navigation-menu": "^1.2.13",
35
  "@radix-ui/react-popover": "^1.1.14",
36
  "@radix-ui/react-progress": "^1.1.7",
37
- "@radix-ui/react-radio-group": "^1.3.7",
38
  "@radix-ui/react-scroll-area": "^1.2.9",
39
  "@radix-ui/react-select": "^2.2.5",
40
  "@radix-ui/react-separator": "^1.1.7",
@@ -44,51 +29,26 @@
44
  "@radix-ui/react-tabs": "^1.1.12",
45
  "@radix-ui/react-toast": "^1.2.14",
46
  "@radix-ui/react-toggle": "^1.1.9",
47
- "@radix-ui/react-toggle-group": "^1.1.10",
48
  "@radix-ui/react-tooltip": "^1.2.7",
49
- "@reactuses/core": "^6.0.5",
50
- "@tanstack/react-query": "^5.82.0",
51
- "@tanstack/react-table": "^8.21.3",
52
  "class-variance-authority": "^0.7.1",
53
  "clsx": "^2.1.1",
54
- "cmdk": "^1.1.1",
55
- "date-fns": "^4.1.0",
56
- "embla-carousel-react": "^8.6.0",
57
  "framer-motion": "^12.23.2",
58
- "input-otp": "^1.4.2",
59
  "lucide-react": "^0.525.0",
60
- "next": "^16.1.1",
61
- "next-auth": "^4.24.11",
62
- "next-intl": "^4.3.4",
63
- "next-themes": "^0.4.6",
64
  "prisma": "^6.11.1",
65
  "react": "^19.0.0",
66
- "react-day-picker": "^9.8.0",
67
  "react-dom": "^19.0.0",
68
  "react-hook-form": "^7.60.0",
69
- "react-markdown": "^10.1.0",
70
- "react-resizable-panels": "^3.0.3",
71
- "react-syntax-highlighter": "^15.6.1",
72
- "recharts": "^2.15.4",
73
- "sharp": "^0.34.3",
74
  "sonner": "^2.0.6",
75
  "tailwind-merge": "^3.3.1",
76
- "tailwindcss-animate": "^1.0.7",
77
- "uuid": "^11.1.0",
78
- "vaul": "^1.1.2",
79
  "z-ai-web-dev-sdk": "^0.0.16",
80
- "zod": "^4.0.2",
81
- "zustand": "^5.0.6"
82
  },
83
  "devDependencies": {
84
  "@tailwindcss/postcss": "^4",
85
  "@types/react": "^19",
86
  "@types/react-dom": "^19",
87
- "bun-types": "^1.3.4",
88
- "eslint": "^9",
89
- "eslint-config-next": "^16.1.1",
90
  "tailwindcss": "^4",
91
- "tw-animate-css": "^1.3.5",
92
  "typescript": "^5"
93
  }
94
  }
 
1
  {
2
+ "name": "sofia-cloud",
3
+ "version": "1.0.0",
4
  "private": true,
5
  "scripts": {
6
+ "dev": "next dev -p 3000 -H 0.0.0.0",
7
+ "build": "next build",
8
+ "start": "next start -p 3000 -H 0.0.0.0",
9
+ "lint": "eslint ."
 
 
 
 
10
  },
11
  "dependencies": {
 
 
 
12
  "@hookform/resolvers": "^5.1.1",
 
13
  "@prisma/client": "^6.11.1",
14
  "@radix-ui/react-accordion": "^1.2.11",
15
  "@radix-ui/react-alert-dialog": "^1.1.14",
 
16
  "@radix-ui/react-avatar": "^1.1.10",
17
  "@radix-ui/react-checkbox": "^1.3.2",
 
 
18
  "@radix-ui/react-dialog": "^1.1.14",
19
  "@radix-ui/react-dropdown-menu": "^2.1.15",
 
20
  "@radix-ui/react-label": "^2.1.7",
 
 
21
  "@radix-ui/react-popover": "^1.1.14",
22
  "@radix-ui/react-progress": "^1.1.7",
 
23
  "@radix-ui/react-scroll-area": "^1.2.9",
24
  "@radix-ui/react-select": "^2.2.5",
25
  "@radix-ui/react-separator": "^1.1.7",
 
29
  "@radix-ui/react-tabs": "^1.1.12",
30
  "@radix-ui/react-toast": "^1.2.14",
31
  "@radix-ui/react-toggle": "^1.1.9",
 
32
  "@radix-ui/react-tooltip": "^1.2.7",
 
 
 
33
  "class-variance-authority": "^0.7.1",
34
  "clsx": "^2.1.1",
 
 
 
35
  "framer-motion": "^12.23.2",
 
36
  "lucide-react": "^0.525.0",
37
+ "next": "^15.3.0",
 
 
 
38
  "prisma": "^6.11.1",
39
  "react": "^19.0.0",
 
40
  "react-dom": "^19.0.0",
41
  "react-hook-form": "^7.60.0",
 
 
 
 
 
42
  "sonner": "^2.0.6",
43
  "tailwind-merge": "^3.3.1",
 
 
 
44
  "z-ai-web-dev-sdk": "^0.0.16",
45
+ "zod": "^4.0.2"
 
46
  },
47
  "devDependencies": {
48
  "@tailwindcss/postcss": "^4",
49
  "@types/react": "^19",
50
  "@types/react-dom": "^19",
 
 
 
51
  "tailwindcss": "^4",
 
52
  "typescript": "^5"
53
  }
54
  }