Neon-AI commited on
Commit
215e41e
·
verified ·
1 Parent(s): 3315f81

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -7
Dockerfile CHANGED
@@ -1,30 +1,36 @@
1
  FROM node:20-slim
2
 
3
- # Install git, curl, certificates
4
- RUN apt-get update && apt-get install -y git curl ca-certificates && rm -rf /var/lib/apt/lists/*
 
 
5
 
6
  # Install Git LFS
7
  RUN curl -sSL https://github.com/git-lfs/git-lfs/releases/download/v3.4.0/git-lfs-linux-amd64-v3.4.0.tar.gz \
8
  | tar -xz -C /tmp && \
9
  mv /tmp/git-lfs-3.4.0/git-lfs /usr/local/bin/git-lfs && \
10
- chmod +x /usr/local/bin/git-lfs && git lfs install
 
11
 
12
  WORKDIR /app
13
 
14
- # Clone repo using GH_TOKEN secret
15
  RUN --mount=type=secret,id=GH_TOKEN \
16
  git clone https://$(cat /run/secrets/GH_TOKEN)@github.com/IMaduwike/telebot-api.git .
17
 
18
- # Pull LFS binary
19
  RUN git lfs pull
20
 
21
- # Move telegram-bot-api to /usr/local/bin
22
  RUN mv telegram-bot-api /usr/local/bin/telegram-bot-api && chmod +x /usr/local/bin/telegram-bot-api
23
 
 
 
 
24
  # Install Node dependencies
25
  RUN npm install
26
 
27
  EXPOSE 7860
28
 
29
- # Start TDLib + Node server via shell
30
  CMD ["sh", "./start.sh"]
 
1
  FROM node:20-slim
2
 
3
+ # Install dependencies
4
+ RUN apt-get update && \
5
+ apt-get install -y git curl ca-certificates && \
6
+ rm -rf /var/lib/apt/lists/*
7
 
8
  # Install Git LFS
9
  RUN curl -sSL https://github.com/git-lfs/git-lfs/releases/download/v3.4.0/git-lfs-linux-amd64-v3.4.0.tar.gz \
10
  | tar -xz -C /tmp && \
11
  mv /tmp/git-lfs-3.4.0/git-lfs /usr/local/bin/git-lfs && \
12
+ chmod +x /usr/local/bin/git-lfs && \
13
+ git lfs install
14
 
15
  WORKDIR /app
16
 
17
+ # Clone private repo (secret GH_TOKEN)
18
  RUN --mount=type=secret,id=GH_TOKEN \
19
  git clone https://$(cat /run/secrets/GH_TOKEN)@github.com/IMaduwike/telebot-api.git .
20
 
21
+ # Pull Git LFS binary
22
  RUN git lfs pull
23
 
24
+ # Move binary to /usr/local/bin and make executable
25
  RUN mv telegram-bot-api /usr/local/bin/telegram-bot-api && chmod +x /usr/local/bin/telegram-bot-api
26
 
27
+ # Make sure start.sh is executable
28
+ RUN chmod +x start.sh
29
+
30
  # Install Node dependencies
31
  RUN npm install
32
 
33
  EXPOSE 7860
34
 
35
+ # Run start.sh via shell (so Node doesn't try to execute it as JS)
36
  CMD ["sh", "./start.sh"]