tx / Dockerfile
stnh70's picture
Update Dockerfile
bd73dc6 verified
raw
history blame contribute delete
814 Bytes
FROM denoland/deno:alpine
# 创建工作目录
WORKDIR /app
# 复制所有文件
COPY . .
# 缓存主程序
# 缓存依赖
RUN deno cache --allow-import thunderapi/tgbot.ts thunderapi/thunderapi.ts
# RUN deno cache thunderapi/thunderapi.ts
# 设置环境变量(实际使用时应通过运行时环境变量注入)
ENV SECRET_TOKEN="your_secret_token_here"
ENV THUNDERX_USERNAME="your_username_here"
ENV THUNDERX_PASSWORD="your_password_here"
ENV BOT_TOKEN="telegram_bot_token_here"
ENV ALLOWED_USERS="telegram_id_here"
#ENV THUNDERX_API_URL="your_password_here"
# 设置入口点,指向thunderapi子目录中的文件
ENTRYPOINT ["deno", "run", "--allow-net", "--allow-env", "--allow-read", "--allow-write","--allow-import", "thunderapi/thunderapi.ts"]
# Hugging Face Spaces使用7860端口
EXPOSE 7860