Hanzo Dev commited on
Commit
32a7e1f
·
1 Parent(s): d8886c0

Simplify Docker startup

Browse files
Files changed (4) hide show
  1. .npmrc +1 -0
  2. Dockerfile +7 -10
  3. README.bak.md +41 -0
  4. next.config.js +0 -1
.npmrc ADDED
@@ -0,0 +1 @@
 
 
1
+ legacy-peer-deps=true
Dockerfile CHANGED
@@ -2,20 +2,17 @@ FROM node:20-slim
2
 
3
  WORKDIR /app
4
 
5
- # Copy only package files first for better caching
6
- COPY package*.json ./
7
 
8
- # Install dependencies with legacy peer deps
9
  RUN npm ci --legacy-peer-deps
10
 
11
- # Copy the rest of the application
12
- COPY . .
13
-
14
- # Build the Next.js app
15
  RUN npm run build
16
 
17
- # Expose the port
18
  EXPOSE 3000
19
 
20
- # Use Node directly to avoid npm overhead
21
- CMD ["node", ".next/standalone/server.js"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Copy everything
6
+ COPY . .
7
 
8
+ # Install dependencies
9
  RUN npm ci --legacy-peer-deps
10
 
11
+ # Build the app
 
 
 
12
  RUN npm run build
13
 
14
+ # Expose port
15
  EXPOSE 3000
16
 
17
+ # Start with npm start
18
+ CMD ["npm", "start"]
README.bak.md ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: api-docs Template
3
+ emoji: 🚀
4
+ colorFrom: gray
5
+ colorTo: gray
6
+ sdk: docker
7
+ app_port: 3000
8
+ pinned: true
9
+ ---
10
+
11
+ # api-docs Template
12
+
13
+ A Hanzo template for building modern applications.
14
+
15
+ ## Features
16
+ - Built with @hanzo/ui
17
+ - Fully responsive
18
+ - TypeScript support
19
+ - Tailwind CSS styling
20
+ - shadcn/ui components
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ npx create-hanzo-app --template api-docs
26
+ ```
27
+
28
+ ## Development
29
+
30
+ ```bash
31
+ npm install
32
+ npm run dev
33
+ ```
34
+
35
+ ## Build
36
+
37
+ ```bash
38
+ npm run build
39
+ ```
40
+
41
+ Check out the [Hanzo Template Gallery](https://huggingface.co/spaces/hanzoai/gallery) for more templates.
next.config.js CHANGED
@@ -1,6 +1,5 @@
1
  /** @type {import('next').NextConfig} */
2
  const nextConfig = {
3
- output: 'standalone',
4
  reactStrictMode: true,
5
  swcMinify: true,
6
  }
 
1
  /** @type {import('next').NextConfig} */
2
  const nextConfig = {
 
3
  reactStrictMode: true,
4
  swcMinify: true,
5
  }