Merge pull request #1 from shihaamabr/master

added docker support
This commit is contained in:
Udit Karode 2023-04-08 16:41:06 +05:30 committed by GitHub
commit 3e088e5ab0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 0 deletions

16
.build/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM node:18.15.0-alpine3.17
# Set build shell to bash, default has has some issues sometimes
#SHELL ["/bin/bash", "-c"]
WORKDIR /root
COPY . .
RUN yarn install \
&& rm -rf /usr/local/share/.cache
#&& yarn build
CMD yarn build && yarn start

View File

@ -0,0 +1,9 @@
version: '3.5'
services:
#########################
bing-tg:
build:
context: ..
dockerfile: .build/Dockerfile
hostname: bing-tg
image: bing-tg

View File

@ -8,6 +8,13 @@ A Telegram bot that lets you interact with the Bing AI from chats that you allow
* Copy `variables.example.ts` to `variables.ts`, go through it, and add the required information. * Copy `variables.example.ts` to `variables.ts`, go through it, and add the required information.
* Run `yarn dev` or `yarn build && yarn start` to start the bot. * Run `yarn dev` or `yarn build && yarn start` to start the bot.
### OR using docker
**> To start using this project,**
* Run `docker compose -f .build/docker-compose.yml build` to build the container
* Copy `variables.example.ts` to `variables.ts`, go through it, and add the required information.
* Run `docker compose up -d` to start the bot.
**> To enable Telegram command autocompletion,** **> To enable Telegram command autocompletion,**
* Press the `Edit Commands` button in your bot's menu on BotFather, and paste the following: * Press the `Edit Commands` button in your bot's menu on BotFather, and paste the following:
``` ```

8
docker-compose.yml Normal file
View File

@ -0,0 +1,8 @@
version: '3.5'
services:
#########################
bing-tg:
hostname: bing-tg
image: bing-tg
volumes:
- ./variables.ts:/root/variables.ts