Spaces:
Sleeping
Sleeping
FauziIsyrinApridal
commited on
Commit
·
15d87f8
1
Parent(s):
17fabdd
fix docker
Browse files- Dockerfile +4 -6
- package.json +1 -1
Dockerfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
# Gunakan Python base image dengan Debian
|
2 |
FROM python:3.11-slim AS base
|
3 |
|
4 |
-
# Install curl dan Node.js 18 (
|
5 |
RUN apt-get update && \
|
6 |
apt-get install -y curl gnupg build-essential && \
|
7 |
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
@@ -19,20 +19,18 @@ RUN npm install
|
|
19 |
COPY . .
|
20 |
|
21 |
# Install dependencies Python
|
22 |
-
COPY requirements.txt .
|
23 |
RUN pip install --no-cache-dir -r requirements.txt
|
24 |
|
25 |
# Build Next.js app
|
26 |
RUN npm run build
|
27 |
|
28 |
-
#
|
29 |
EXPOSE 7860
|
30 |
|
31 |
-
#
|
32 |
CMD ["npm", "start"]
|
33 |
|
34 |
-
|
35 |
-
|
36 |
# Dockerfile Lama
|
37 |
# Node image
|
38 |
# FROM node:22.2-alpine
|
|
|
1 |
# Gunakan Python base image dengan Debian
|
2 |
FROM python:3.11-slim AS base
|
3 |
|
4 |
+
# Install curl, build tools, dan Node.js 18 (LTS)
|
5 |
RUN apt-get update && \
|
6 |
apt-get install -y curl gnupg build-essential && \
|
7 |
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
|
|
19 |
COPY . .
|
20 |
|
21 |
# Install dependencies Python
|
22 |
+
COPY requirements.txt .
|
23 |
RUN pip install --no-cache-dir -r requirements.txt
|
24 |
|
25 |
# Build Next.js app
|
26 |
RUN npm run build
|
27 |
|
28 |
+
# Port for HF Spaces
|
29 |
EXPOSE 7860
|
30 |
|
31 |
+
# Start in production mode and bind to 0.0.0.0:7860
|
32 |
CMD ["npm", "start"]
|
33 |
|
|
|
|
|
34 |
# Dockerfile Lama
|
35 |
# Node image
|
36 |
# FROM node:22.2-alpine
|
package.json
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
"scripts": {
|
6 |
"dev": "next dev",
|
7 |
"build": "next build",
|
8 |
-
"start": "next start",
|
9 |
"lint": "next lint"
|
10 |
},
|
11 |
"dependencies": {
|
|
|
5 |
"scripts": {
|
6 |
"dev": "next dev",
|
7 |
"build": "next build",
|
8 |
+
"start": "next start -p 7860 -H 0.0.0.0",
|
9 |
"lint": "next lint"
|
10 |
},
|
11 |
"dependencies": {
|