EmoCube commited on
Commit
fc064a7
·
verified ·
1 Parent(s): 038a2e0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -21
Dockerfile CHANGED
@@ -1,28 +1,25 @@
1
- # This is Lechcher's VPS on Hugging face or OpenXLab! (Lxde version)
2
- FROM debian:sid
3
- # This is user's part:
4
- RUN useradd -m -u 1000 user
5
 
6
- # Upgrade and update your system:
7
- RUN apt update
8
- RUN apt install software-properties-common apt-transport-https curl -y
9
 
10
- # This is desktop environment and dependents part:
11
- RUN apt install xfce4-terminal lxde aqemu sudo curl wget aria2 qemu-system-x86 htop chromium screen tigervnc-standalone-server python3-pip python3-websockify python3 git -y && rm -rf /var/lib/apt/lists/*
12
 
13
- # This is set default graphical target:
14
- RUN systemctl get-default
15
- RUN systemctl set-default graphical.target
16
 
17
- # Emable 32bit support:
18
- RUN dpkg --add-architecture i386
19
 
20
- # This is part that you can install your apps by: RUN apt install <repositories>:
 
21
 
22
- # This is VNC viewer part:
23
- RUN git clone https://github.com/novnc/noVNC.git noVNC
24
- ENV HOME=/home/user \
25
- PATH=/home/user/.local/bin:$PATH
26
 
27
- # This is the command to run VPS:
28
- CMD vncserver -SecurityTypes None -geometry 1280x600 && ./noVNC/utils/novnc_proxy --vnc localhost:5901 --listen 0.0.0.0:7860
 
1
+ # Используем официальный образ Node.js на базе Debian
2
+ FROM node:18-slim
 
 
3
 
4
+ # Устанавливаем рабочую директорию
5
+ WORKDIR /usr/src/app
 
6
 
7
+ # Копируем package.json и package-lock.json (или yarn.lock)
8
+ COPY package*.json ./
9
 
10
+ # Устанавливаем зависимости
11
+ RUN npm install
 
12
 
13
+ # Копируем остальные файлы проекта
14
+ COPY . .
15
 
16
+ # Собираем приложение (если нужно)
17
+ RUN npm run build
18
 
19
+ # Указываем порт, который будет использовать приложение
20
+ # (Hugging Face Spaces ожидает, что приложение слушает порт 7860)
21
+ ENV PORT=7860
22
+ EXPOSE 7860
23
 
24
+ # Команда для запуска приложения
25
+ CMD ["npm", "start"]