Merge pull request #2 from shihaamabr/master

docker to use .env
This commit is contained in:
Udit Karode 2023-04-09 21:45:31 +05:30 committed by GitHub
commit bdfb91a604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 10 deletions

View File

@ -9,8 +9,7 @@ WORKDIR /root
COPY . . COPY . .
RUN yarn install \ RUN yarn install \
&& yarn build \
&& rm -rf /usr/local/share/.cache && rm -rf /usr/local/share/.cache
#&& yarn build CMD yarn start
CMD yarn build && yarn start

View File

@ -6,4 +6,4 @@ services:
context: .. context: ..
dockerfile: .build/Dockerfile dockerfile: .build/Dockerfile
hostname: bing-tg hostname: bing-tg
image: bing-tg image: git.shihaam.dev/dockerfiles/bing-chat-telegram

View File

@ -3,15 +3,21 @@
A Telegram bot that lets you interact with the Bing AI from chats that you allow in the config. A Telegram bot that lets you interact with the Bing AI from chats that you allow in the config.
**> To start using this project,** **> To start using this project,**
- Git clone and cd into cloned dir
- Run `yarn install` to install the dependencies. - Run `yarn install` to install the dependencies.
- Create a `.env` file or set environment variables according to the reference file `.env.example` - Create a `.env` file or set environment variables according to the reference file `.env.example`
- Run `yarn dev` or `yarn build && yarn start` to start the bot. - Run `yarn dev` or `yarn build && yarn start` to start the bot.
**> To start using this project using Docker,** **> To start using this project using Docker,**
- Git clone and cd into cloned dir
- Run `docker compose -f .build/docker-compose.yml build` to build the container.
- Create a `.env` file or set environment variables according to the reference file `.env.example`
- Run `docker compose up -d` to start the bot.
- Run `docker compose -f .build/docker-compose.yml push` to push container to registry.
- Run `docker compose -f .build/docker-compose.yml build` to build the container **> To start using this project using Docker in prod,**
- TODO - Create `docker-compose.yml` with the content from `docker-compose.yml` in repo.
- Create `.env` with the required variables. (see .env.example in repo)
- Run `docker compose up -d` to start the bot. - Run `docker compose up -d` to start the bot.
**> To enable Telegram command autocompletion,** **> To enable Telegram command autocompletion,**

View File

@ -3,6 +3,7 @@ services:
######################### #########################
bing-tg: bing-tg:
hostname: bing-tg hostname: bing-tg
image: bing-tg image: git.shihaam.dev/dockerfiles/bing-chat-telegram
volumes: env_file:
- ./variables.ts:/root/variables.ts - .env
restart: always