Adding Dockerfile and adding image building to the Drone pipeline. Also adding running instructions to the README.md.
This commit is contained in:
parent
8939b2fb62
commit
b20c248fd9
23
.drone.yml
23
.drone.yml
|
@ -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
16
Dockerfile
Normal 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"]
|
12
README.md
12
README.md
|
@ -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
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue