Update Dockerfile
Browse files- Dockerfile +23 -21
Dockerfile
CHANGED
|
@@ -1,30 +1,32 @@
|
|
| 1 |
-
FROM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
#
|
| 6 |
-
|
| 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 |
-
|
| 15 |
-
RUN
|
| 16 |
-
&& pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
RUN mkdir -p /app/data
|
| 26 |
|
| 27 |
EXPOSE 7860
|
| 28 |
-
ENV PORT=7860
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
| 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"]
|