000x commited on
Commit
36a7db6
·
verified ·
1 Parent(s): e87bde3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -21
Dockerfile CHANGED
@@ -1,46 +1,36 @@
1
  FROM node:22-bookworm-slim
2
 
 
3
  RUN apt-get update && \
4
  apt-get install -y --no-install-recommends \
5
  git \
6
  ca-certificates \
7
  && rm -rf /var/lib/apt/lists/*
8
 
 
9
  RUN corepack enable && \
10
  corepack prepare pnpm@10.30.1 --activate
11
 
12
  WORKDIR /app
13
 
14
- # Clone latest OpenSEO
15
  RUN git clone --depth 1 https://github.com/every-app/open-seo.git .
16
 
17
- # Allow Hugging Face hostname
18
- RUN cat > vite.config.js <<'EOF'
19
- import { defineConfig } from "vite";
20
-
21
- export default defineConfig({
22
- server: {
23
- host: "0.0.0.0",
24
- allowedHosts: true
25
- },
26
- preview: {
27
- host: "0.0.0.0",
28
- port: 7860,
29
- allowedHosts: true
30
- }
31
- });
32
- EOF
33
-
34
  # Install dependencies
35
  RUN pnpm install --frozen-lockfile
36
 
37
- # Build
38
- RUN pnpm build
39
-
40
  ENV NODE_ENV=production
41
  ENV PORT=7860
42
  ENV HOST=0.0.0.0
43
 
 
 
 
 
 
 
44
  EXPOSE 7860
45
 
 
46
  CMD ["pnpm", "exec", "vite", "preview", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM node:22-bookworm-slim
2
 
3
+ # Install Git
4
  RUN apt-get update && \
5
  apt-get install -y --no-install-recommends \
6
  git \
7
  ca-certificates \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
+ # Enable the exact pnpm version used by OpenSEO
11
  RUN corepack enable && \
12
  corepack prepare pnpm@10.30.1 --activate
13
 
14
  WORKDIR /app
15
 
16
+ # Clone the latest OpenSEO source
17
  RUN git clone --depth 1 https://github.com/every-app/open-seo.git .
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  # Install dependencies
20
  RUN pnpm install --frozen-lockfile
21
 
22
+ # Hugging Face configuration
 
 
23
  ENV NODE_ENV=production
24
  ENV PORT=7860
25
  ENV HOST=0.0.0.0
26
 
27
+ # Allow Hugging Face hostname
28
+ ENV ALLOWED_HOST=000x-sinhala-subtitle-hardcoder.hf.space
29
+
30
+ # Build the REAL OpenSEO application
31
+ RUN pnpm build
32
+
33
  EXPOSE 7860
34
 
35
+ # Start the actual OpenSEO server
36
  CMD ["pnpm", "exec", "vite", "preview", "--host", "0.0.0.0", "--port", "7860"]