Spaces:
newtext
/
No application file

File size: 1,471 Bytes
a45456b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM debian:12


ENV CHROME_BIN=/usr/bin/google-chrome
ENV DEBIAN_FRONTEND=noninteractive

ENV TZ=Asia/Jakarta 
ENV USERNAME=localhost
ENV HOSTNAME=Elysia
ENV BOT_DIR=bot
ENV PORT=7860
ENV SETUP_SH=setup.sh
ENV REPO=ElysiaBOT
ENV FILE=client.js

RUN apt update -y
RUN apt-get update 
RUN apt-get install -y \
    software-properties-common \
    bash 
RUN apt-get install -y  android-sdk-build-tools
    
RUN apt-get install -y \
    git \
    curl \
    wget \
    npm \
    unzip \
    ffmpeg \
    speedtest-cli \
    webp \
    neofetch \
    gawk \
    httrack \
    build-essential 

RUN curl -Ssf https://pkgx.sh | sh

RUN wget -q https://gist.githubusercontent.com/rull05/4116fa9d49a3c02aac7743eb270e7a5e/raw/a1f7bf6d56304384efd2031c11563e9cf6f5da46/apple-font.sh -O ./apple-font.sh
RUN chmod +x apple-font.sh
RUN ./apple-font.sh

RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt-get install -y ./google-chrome-stable_current_amd64.deb

RUN rm -rf /var/lib/apt/lists/*

RUN npm install n -g 
RUN n v23
RUN npm install npm@latest -g
RUN npm install -g bun@latest

RUN useradd -m -u 1000 $USERNAME

#END OF ROOT USER#

USER $USERNAME

ENV HOME=/home/$USERNAME
ENV PATH=/home/$USERNAME/.local/bin:$PATH

ENV WORKDIR=$HOME/$BOT_DIR

WORKDIR $WORKDIR
COPY --chown=$USERNAME . $WORKDIR
RUN npm install

EXPOSE $PORT
RUN chmod -R 777 $WORKDIR

# CMD ["bun", "run", "index.js"]
CMD ["node", "--experimental-vm-modules", "app.js"]