Neon-AI commited on
Commit
8e40137
·
verified ·
1 Parent(s): 2d6987e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -3
Dockerfile CHANGED
@@ -1,12 +1,20 @@
 
1
  FROM node:20-slim
2
 
3
  RUN apt-get update && apt-get install -y git
4
 
5
  WORKDIR /app
6
 
7
- ARG GH_TOKEN
8
  RUN --mount=type=secret,id=GH_TOKEN \
9
- git clone https://$(cat /run/secrets/GH_TOKEN)@github.com/IMaduwike/telebot-api.git .
 
 
 
 
 
10
 
11
  RUN npm install
12
- CMD ["node", "server.js"]
 
 
 
1
+ # syntax=docker/dockerfile:1.6
2
  FROM node:20-slim
3
 
4
  RUN apt-get update && apt-get install -y git
5
 
6
  WORKDIR /app
7
 
8
+ # Securely clone private repo
9
  RUN --mount=type=secret,id=GH_TOKEN \
10
+ git clone https://$(cat /run/secrets/GH_TOKEN)@github.com/IMaduwike/telebot-api.git temp
11
+
12
+ RUN mv temp/server.js temp/package.json temp/start.sh ./ \
13
+ && mv temp/telegram-bot-api /usr/local/bin/telegram-bot-api \
14
+ && chmod +x /usr/local/bin/telegram-bot-api start.sh \
15
+ && rm -rf temp
16
 
17
  RUN npm install
18
+
19
+ EXPOSE 7860
20
+ CMD ["./start.sh"]