Adds Dockerfile, docker-compose, and updates README.

This commit is contained in:
uxname committed 2025-06-02 20:54:29 +03:00
1 parent 29c9e6df18
commit fa126651de
3 files changed
+75 -26

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
FROM oven/bun:alpine
WORKDIR /app
COPY . .
RUN apk add git && bun install && bun run build && rm -rf .git
ENV NODE_ENV=production
CMD ["bun", "start"]
+55 -26
View File
@@ -1,54 +1,82 @@
# AI Pipelines with Telegram Bot
# Aptos Hackathon
This project provides a framework for creating and executing AI-powered pipelines, with a Telegram bot interface for easy interaction.
Project for Aptos Hackathon (backend)
## Features
- Execute AI-powered pipelines using OpenAI's models
- Integration with Model Context Protocol (MCP) tools
- Telegram bot interface for easy interaction
- Execute AI pipelines using OpenAI models
- Integration with Model Context Protocol (MCP)
- Convenient Telegram bot interface
- Support for dynamic prompts and variables
## Prerequisites
## Running with Docker Compose (Recommended)
- Node.js and Bun installed
- OpenAI API key
- Telegram Bot Token (get it from [@BotFather](https://t.me/botfather))
### Prerequisites
## Setup
- Docker and Docker Compose installed
- `.env` file with required environment variables
1. Clone the repository
2. Install dependencies:
### Setup
```bash
bun install
```
3. Copy `.env.example` to `.env` and fill in your credentials:
1. Copy `.env.example` to `.env` and configure the settings:
```bash
cp .env.example .env
```
4. Edit the `.env` file and add your:
2. Edit the `.env` file and set:
- `OPENAI_API_KEY` - Your OpenAI API key
- `TELEGRAM_BOT_TOKEN` - Your Telegram bot token from @BotFather
- `MCP_SERVER_URL` - (Optional) MCP server URL (defaults to Santiment's MCP server)
- `TELEGRAM_BOT_TOKEN` - Your Telegram bot token (get it from @BotFather)
- `MCP_SERVER_URL` - (Optional) MCP server URL
## Running the Bot
### Running the Application
Start the bot with:
Build and start the container:
```bash
bun start
docker-compose up --build -d
```
Or in development mode with auto-reload:
### Viewing Logs
```bash
docker-compose logs -f
```
### Stopping the Application
```bash
docker-compose down
```
## Local Development
### Prerequisites
- Bun installed
- Node.js
### Installing Dependencies
```bash
bun install
```
### Running the Application
In development mode with auto-reload:
```bash
bun --watch src/main.ts
```
Or in production mode:
```bash
bun run build
bun start
```
## Using the Bot
1. Find your bot on Telegram using the username you set with @BotFather
@@ -67,8 +95,9 @@ bun --watch src/main.ts
## Development
- Run linter: `bun run lint`
- Run type checking: `bun run ts:check`
- Run both: `bun run check`
- Type checking: `bun run ts:check`
- Run all checks: `bun run check`
- Code formatting: `bun run lint:fix`
## License
+10
View File
@@ -0,0 +1,10 @@
services:
app:
build: .
restart: unless-stopped
env_file:
- .env
volumes:
- ./.env:/app/.env
ports:
- "3000:3000"