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

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' image: 'golang:alpine'
commands: commands:
- go build -x . - go build -x .
when:
trigger:
event: event:
include:
- pull_request
- push - 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 # 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) [![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
```