From 0c54b9cc22432a0344ad40b625df542766dd6e66 Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Sat, 21 Sep 2024 02:20:24 +0500 Subject: [PATCH] docker build --- .build/Dockerfile | 9 +++++++++ .build/compose.yml | 6 ++++++ .env.example | 2 ++ compose.yml | 7 +++++++ 4 files changed, 24 insertions(+) create mode 100644 .build/Dockerfile create mode 100644 .build/compose.yml create mode 100644 .env.example create mode 100644 compose.yml diff --git a/.build/Dockerfile b/.build/Dockerfile new file mode 100644 index 0000000..b677b7e --- /dev/null +++ b/.build/Dockerfile @@ -0,0 +1,9 @@ +FROM python:3.11-slim + +WORKDIR /app + +COPY relay.py . + +RUN pip install --no-cache-dir aiosmtpd python-telegram-bot + +CMD ["python", "relay.py"] diff --git a/.build/compose.yml b/.build/compose.yml new file mode 100644 index 0000000..eca3119 --- /dev/null +++ b/.build/compose.yml @@ -0,0 +1,6 @@ +services: + smtp-to-telegram: + build: + context: ../ + dockerfile: .build/Dockerfile + image: git.shihaam.dev/shihaam/smtp-to-telegram diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..4b57497 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +TELEGRAM_API_KEY= +TELEGRAM_CHAT_ID= diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..e680d5e --- /dev/null +++ b/compose.yml @@ -0,0 +1,7 @@ +services: + smtp-to-telegram: + image: git.shihaam.dev/shihaam/smtp-to-telegram + restart: always + env_file: .env + ports: + - 2525:2525