mirror of
https://github.com/nikdoof/smsbot.git
synced 2025-12-13 10:02:15 +00:00
Compare commits
2 Commits
smsbot-hel
...
0.0.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
899b88e907
|
|||
|
000f0932d8
|
35
Dockerfile
35
Dockerfile
@@ -1,34 +1,21 @@
|
||||
FROM python:3.9-alpine AS base
|
||||
|
||||
# Builder
|
||||
FROM base AS builder
|
||||
|
||||
ENV PYTHONFAULTHANDLER=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PYTHONHASHSEED=random \
|
||||
PIP_NO_CACHE_DIR=off \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=on \
|
||||
PIP_DEFAULT_TIMEOUT=100 \
|
||||
POETRY_NO_INTERACTION=1 \
|
||||
POETRY_VIRTUALENVS_CREATE=false \
|
||||
PATH="$PATH:/runtime/bin" \
|
||||
PYTHONPATH="$PYTHONPATH:/runtime/lib/python3.9/site-packages" \
|
||||
# Versions:
|
||||
POETRY_VERSION=2.1.1
|
||||
|
||||
# System deps:
|
||||
RUN apk add build-base unzip wget python3-dev libffi-dev rust cargo openssl-dev
|
||||
RUN pip install "poetry==$POETRY_VERSION" "poetry-plugin-export"
|
||||
ENV POETRY_VERSION=2.1.1
|
||||
|
||||
RUN apk add build-base unzip wget python3-dev libffi-dev rust cargo openssl-dev && pip install "poetry==$POETRY_VERSION" && poetry self add poetry-plugin-bundle
|
||||
WORKDIR /src
|
||||
COPY poetry.lock pyproject.toml README.md /src/
|
||||
COPY smsbot /src/smsbot
|
||||
RUN poetry bundle venv /runtime
|
||||
|
||||
# Generate requirements and install *all* dependencies.
|
||||
COPY pyproject.toml poetry.lock /src/
|
||||
RUN poetry export --without-hashes --no-interaction --no-ansi -f requirements.txt -o requirements.txt
|
||||
RUN pip install --prefix=/runtime --force-reinstall -r requirements.txt
|
||||
|
||||
# Final container
|
||||
FROM base AS runtime
|
||||
COPY --from=builder /runtime /usr/local
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /runtime /runtime
|
||||
ENV PATH=/runtime/bin:$PATH
|
||||
EXPOSE 8000/tcp
|
||||
CMD ["/usr/local/bin/smsbot"]
|
||||
CMD ["smsbot"]
|
||||
@@ -1,10 +1,8 @@
|
||||
[project]
|
||||
name = "smsbot"
|
||||
version = "0.0.5"
|
||||
version = "0.0.6"
|
||||
description = "A simple Telegram bot to receive SMS messages."
|
||||
authors = [
|
||||
{name = "Andrew Williams",email = "andy@tensixtyone.com"}
|
||||
]
|
||||
authors = [{ name = "Andrew Williams", email = "andy@tensixtyone.com" }]
|
||||
license = { text = "MIT" }
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9,<3.10"
|
||||
@@ -13,12 +11,16 @@ dependencies = [
|
||||
"waitress (>=3.0.2,<4.0.0)",
|
||||
"twilio (>=9.4.6,<10.0.0)",
|
||||
"python-telegram-bot (<20)",
|
||||
"prometheus-client (>=0.21.1,<0.22.0)"
|
||||
"prometheus-client (>=0.21.1,<0.22.0)",
|
||||
]
|
||||
|
||||
[tool.poetry]
|
||||
packages = [{ include = "smsbot" }]
|
||||
|
||||
[tool.poetry.scripts]
|
||||
smsbot = "smsbot.cli:main"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
Reference in New Issue
Block a user