From 62b303a64e422b8cea794ce785721479a0aca547 Mon Sep 17 00:00:00 2001 From: lans <> Date: Mon, 19 Aug 2024 08:30:52 +0000 Subject: [PATCH] Expose http port via env variables --- Dockerfile | 7 ++++++- README.md | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 56599b8..4de532a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,9 +15,14 @@ RUN mkdir -p /telegram-bot-api/build && \ # Main image FROM alpine:latest LABEL Maintainer="lans.rf@gmail.com" + +ENV API_ID=some_env_id \ + API_HASH=some_api_hash \ + HTTP_PORT=8081 + RUN apk add zlib openssl gperf && \ mkdir -p /telegram-bot-api/files /telegram-bot-api/temp COPY --from=builder /telegram-bot-api/install/bin/telegram-bot-api /telegram-bot-api/ EXPOSE 8081 -ENTRYPOINT [ "sh", "-c", "/telegram-bot-api/telegram-bot-api --api-id $API_ID --api-hash $API_HASH --dir /telegram-bot-api/files --temp-dir /telegram-bot-api/temp" ] +ENTRYPOINT [ "sh", "-c", "/telegram-bot-api/telegram-bot-api --api-id $API_ID --api-hash $API_HASH --dir /telegram-bot-api/files --temp-dir /telegram-bot-api/temp --http-port=$HTTP_PORT " ] diff --git a/README.md b/README.md index d84b2fa..be66bc9 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ Environment variables: * API_ID * API_HASH +* HTTP_PORT - on this port the bot api will listen for connections + +There are many more configuration options, they could be used by creating your own +docker image from this. Directories and files: * /telegram-bot-api/files here bot api stores downloaded files and other working data