File size: 542 Bytes
4cc1590
 
 
 
 
 
 
 
 
 
d357f40
4cc1590
26d0326
d357f40
4cc1590
 
 
 
 
 
 
 
 
d357f40
c244ec4
 
d357f40
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
FROM node:20

WORKDIR /app

RUN chmod -R 777 /app

RUN apt-get update && \
    apt-get install -y ffmpeg imagemagick git && \
    rm -rf /var/lib/apt/lists/*

# Menggunakan token di secret untuk cloning dan update repositori
RUN --mount=type=secret,id=GITHUB_REPO,required=true \
    git clone $(cat /run/secrets/GITHUB_REPO) mybot || \
    (cd /app/mybot && git pull)

WORKDIR /app/mybot

RUN chmod -R 777 /app/mybot

COPY package*.json ./

RUN npm install 

# Debugging: Cek isi folder
RUN ls -lah /app/mybot

CMD ["node", "src/server.js"]