Merge pull request 'Building Docker image in CI and README.md update' (#1) from feature_docker into main
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

Reviewed-on: #1
This commit is contained in:
Alexey Skobkin 2024-03-10 02:21:58 +00:00
commit 11d12c5858
3 changed files with 48 additions and 5 deletions

View File

@ -7,9 +7,24 @@ steps:
image: 'golang:alpine'
commands:
- go build -x .
when:
event:
- push
trigger:
event:
include:
- pull_request
- push
- name: publish-docker
image: plugins/docker
settings:
username:
from_secret: DOCKER_LOGIN
password:
from_secret: DOCKER_TOKEN
repo:
from_secret: DOCKER_REPO
tags:
- ${DRONE_TAG}
- latest
when:
branch:
- main
event:
- tag

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM golang:1 as builder
WORKDIR /build
COPY . .
RUN go build -o app
FROM alpine:latest
WORKDIR /app
COPY --from=builder /build/app .
CMD ["/app/app"]

View File

@ -1,3 +1,15 @@
# telegram-ollama-reply-bot
[![Build Status](https://ci.skobk.in/api/badges/skobkin/telegram-ollama-reply-bot/status.svg)](https://ci.skobk.in/skobkin/telegram-ollama-reply-bot)
# Usage
## Docker
```shell
docker run \
-e OLLAMA_TOKEN=123 \
-e OLLAMA_BASE_URL=http://ollama.tld:11434 \
-e TELEGRAM_TOKEN=12345 \
skobkin/telegram-llm-bot
```