File size: 743 Bytes
abf7f69
efed5e1
 
 
 
 
 
 
 
 
 
 
 
 
 
abf7f69
efed5e1
 
 
 
f2e4376
efed5e1
4dad523
efed5e1
f2e4376
 
efed5e1
f2e4376
efed5e1
f2e4376
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM node:24-slim

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
    git \
    curl \
    build-essential \
    pkg-config \
    libssl-dev \
    && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
    && rm -rf /var/lib/apt/lists/*

ENV PATH="/root/.cargo/bin:${PATH}"

RUN npm i -g pnpm

WORKDIR /app
RUN chmod -R 777 /app

RUN git clone https://github.com/codeforreal1/compressO.git .

RUN sed -i 's/defineConfig(({ mode }) => ({/defineConfig(({ mode }) => ({ server: { allowedHosts: true }, preview: { allowedHosts: true },/g' vite.config.ts

RUN pnpm install --ignore-scripts
RUN pnpm vite:build

EXPOSE 7860

CMD ["pnpm", "vite", "preview", "--port", "7860", "--host", "0.0.0.0"]