forked from Mirroring/github-release-notifier
Dockerfile & docker compose
Adapt configuration for tests purposes Justfile to simplificate flow
This commit is contained in:
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -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"]
|
||||||
17
Justfile
Normal file
17
Justfile
Normal file
@@ -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
|
||||||
4
conf.ini
4
conf.ini
@@ -1,7 +1,7 @@
|
|||||||
[config]
|
[config]
|
||||||
github_api_url = https://api.github.com/repos/
|
github_api_url = https://api.github.com/repos/
|
||||||
smtp_port = 25
|
smtp_port = 1025
|
||||||
smtp_server = localhost
|
smtp_server = mailhog
|
||||||
sender_email = sender@host.eu
|
sender_email = sender@host.eu
|
||||||
receiver_email = receiver@anotherhost.eu
|
receiver_email = receiver@anotherhost.eu
|
||||||
|
|
||||||
|
|||||||
15
docker-compose.yml
Normal file
15
docker-compose.yml
Normal file
@@ -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"
|
||||||
Reference in New Issue
Block a user