diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e568243 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.10-alpine3.18 + +RUN pip install requests +WORKDIR /app +COPY notifier.py template.html /app/ + +# TODO Dev purporse +COPY conf.ini /app/conf.ini + +ENTRYPOINT ["python3", "/app/notifier.py"] diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..37f458c --- /dev/null +++ b/Justfile @@ -0,0 +1,17 @@ +# https://github.com/casey/just + +up: build + docker compose up -d + docker compose logs + +build: + docker compose build + +rebuild: down + docker compose build + +down: + docker compose down + +force-build: + docker compose build --no-cache diff --git a/conf.ini b/conf.ini index 15bbe66..81cebf5 100644 --- a/conf.ini +++ b/conf.ini @@ -1,7 +1,7 @@ [config] github_api_url = https://api.github.com/repos/ -smtp_port = 25 -smtp_server = localhost +smtp_port = 1025 +smtp_server = mailhog sender_email = sender@host.eu receiver_email = receiver@anotherhost.eu diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..fb79932 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3' + +services: + notifier: + build: . + image: github-release-notifier:1 + container_name: github-release-notifier + volumes: + - ./conf.ini:/app/conf.ini + + mailhog: + image: mailhog/mailhog:v1.0.1 + ports: + - "8025:8025" + - "1025:1025"