fixes
This commit is contained in:
parent
62477be9e5
commit
886290f906
|
@ -0,0 +1 @@
|
|||
command.sh
|
|
@ -0,0 +1,31 @@
|
|||
# Dockerfile References: https://docs.docker.com/engine/reference/builder/
|
||||
|
||||
# Start from python:3.9-alpine base image
|
||||
FROM python:3.9-alpine
|
||||
|
||||
ENV PYTHONFAULTHANDLER=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PYTHONHASHSEED=random \
|
||||
PIP_NO_CACHE_DIR=off \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=on \
|
||||
PIP_DEFAULT_TIMEOUT=100 \
|
||||
POETRY_VERSION=1.1.13
|
||||
|
||||
RUN apk add --no-cache curl
|
||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
|
||||
|
||||
ENV PATH="/root/.poetry/bin:${PATH}"
|
||||
|
||||
# Make dir app
|
||||
WORKDIR /app
|
||||
COPY poetry.lock pyproject.toml /app/
|
||||
|
||||
# Project initialization:
|
||||
RUN poetry config virtualenvs.create false \
|
||||
&& poetry install --no-dev --no-interaction --no-ansi
|
||||
|
||||
# Copy the source from the current directory to the Working Directory inside the container
|
||||
COPY . /app
|
||||
|
||||
# Run the executable
|
||||
CMD ["poetry", "run", "python", "mail-forwarder"]
|
|
@ -79,9 +79,9 @@ for num in msgs[0].split():
|
|||
smtp.send_message(copied_msg, sender, recipient)
|
||||
print("Message sent.")
|
||||
|
||||
print("Sending message to trash...")
|
||||
imap.store(num, '+FLAGS', '\\Deleted')
|
||||
print("Message marked for deletion...")
|
||||
#print("Sending message to trash...")
|
||||
#imap.store(num, '+FLAGS', '\\Deleted')
|
||||
#print("Message marked for deletion...")
|
||||
|
||||
imap.expunge()
|
||||
imap.close()
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package = []
|
||||
|
||||
[metadata]
|
||||
lock-version = "1.1"
|
||||
python-versions = "^3.9"
|
||||
content-hash = "ce2aa767160f871dd3652615ba0a0dceb7733d62eb8cb4665b87f30a562e3adf"
|
||||
|
||||
[metadata.files]
|
|
@ -10,5 +10,5 @@ python = "^3.9"
|
|||
[tool.poetry.dev-dependencies]
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
requires = ["poetry-core>=1.1.13"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
|
Loading…
Reference in New Issue