000x commited on
Commit
c07206d
·
verified ·
1 Parent(s): 67c37da

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -21
Dockerfile CHANGED
@@ -1,30 +1,32 @@
1
- FROM python:3.11-slim
 
 
 
 
 
 
 
 
 
2
 
3
  WORKDIR /app
4
 
5
- # The slim base image can ship a stale/incomplete CA bundle, which
6
- # breaks TLS handshakes to sites like graph-video.facebook.com with
7
- # an opaque "[SSL] unknown error". Install and refresh certificates
8
- # explicitly so outbound HTTPS calls work reliably.
9
- RUN apt-get update \
10
- && apt-get install -y --no-install-recommends ca-certificates openssl \
11
- && update-ca-certificates \
12
- && rm -rf /var/lib/apt/lists/*
13
 
14
- COPY requirements.txt .
15
- RUN pip install --no-cache-dir --upgrade certifi \
16
- && pip install --no-cache-dir -r requirements.txt
17
 
18
- COPY . .
 
19
 
20
- # By default the SQLite DB lives at /app/data/uploader.db (writable
21
- # regardless of which user the container runs as). If you attach a
22
- # persistent storage volume on Hugging Face, set DATA_DIR to its
23
- # mount path (e.g. /data) as a Space secret/variable so the DB
24
- # survives a rebuild.
25
- RUN mkdir -p /app/data
26
 
27
  EXPOSE 7860
28
- ENV PORT=7860
29
 
30
- CMD ["python", "app.py"]
 
 
1
+ FROM node:22-bookworm-slim
2
+
3
+ # Install git + basic build tools
4
+ RUN apt-get update && \
5
+ apt-get install -y --no-install-recommends git ca-certificates && \
6
+ rm -rf /var/lib/apt/lists/*
7
+
8
+ # Enable pnpm
9
+ RUN corepack enable && \
10
+ corepack prepare pnpm@10.30.1 --activate
11
 
12
  WORKDIR /app
13
 
14
+ # Clone the latest OpenSEO source automatically
15
+ RUN git clone --depth 1 https://github.com/every-app/open-seo.git .
 
 
 
 
 
 
16
 
17
+ # Install dependencies
18
+ RUN pnpm install --frozen-lockfile
 
19
 
20
+ # Build OpenSEO
21
+ RUN pnpm build
22
 
23
+ # Hugging Face uses port 7860
24
+ ENV PORT=7860
25
+ ENV HOST=0.0.0.0
26
+ ENV NODE_ENV=production
27
+ ENV CLOUDFLARE_INCLUDE_PROCESS_ENV=true
 
28
 
29
  EXPOSE 7860
 
30
 
31
+ # Start OpenSEO
32
+ CMD ["pnpm", "exec", "vite", "preview", "--host", "0.0.0.0", "--port", "7860"]