From 6f0a29a9ea8ecdb11132a8afa0ee3ff736ce02ae Mon Sep 17 00:00:00 2001 From: Valentin GHIRARDI Date: Wed, 28 Jan 2026 12:07:17 +0100 Subject: [PATCH] modified architecture --- .env.empty | 2 -- Dockerfile | 2 ++ Makefile | 2 +- app/main.py | 7 ++----- compose.yml | 3 +-- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.env.empty b/.env.empty index a24d615..8bf9f2d 100644 --- a/.env.empty +++ b/.env.empty @@ -1,5 +1,3 @@ -HOST= -PORT= CACHE_DURATION= ICS_URL= TIME_ZONE= diff --git a/Dockerfile b/Dockerfile index 4cc9ff6..0d0da16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,6 @@ WORKDIR /app COPY ./app . RUN pip install --no-cache-dir -r requirements.txt +EXPOSE 80 + CMD ["python", "-u", "main.py"] diff --git a/Makefile b/Makefile index 82bc16f..ecdbffc 100644 --- a/Makefile +++ b/Makefile @@ -10,4 +10,4 @@ down: restart: down up logs: - @docker compose logs zeus-filter -f + @docker compose logs -f diff --git a/app/main.py b/app/main.py index 30f2f21..64e0092 100644 --- a/app/main.py +++ b/app/main.py @@ -28,19 +28,16 @@ def main() -> None: signal.signal(signal.SIGTERM, _handle_exit) signal.signal(signal.SIGINT, _handle_exit) - host = _get_environment_variable("HOST") - port = _get_environment_variable("PORT") cache_duration = _get_environment_variable("CACHE_DURATION") ics_url = _get_environment_variable("ICS_URL") time_zone = _get_environment_variable("TIME_ZONE") - port_int = _parse_environment_variable("PORT", port) cache_duration_int = _parse_environment_variable("CACHE_DURATION", cache_duration) utils.set_time_zone(time_zone) - server = Server(host, port_int, cache_duration_int, ics_url) + server = Server("0.0.0.0", 80, cache_duration_int, ics_url) server.serve() if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/compose.yml b/compose.yml index d925e39..98484b4 100644 --- a/compose.yml +++ b/compose.yml @@ -1,10 +1,9 @@ services: zeus-filter: + container_name: zeus-filter build: . restart: unless-stopped environment: - - HOST=${HOST} - - PORT=${PORT} - CACHE_DURATION=${CACHE_DURATION} - ICS_URL=${ICS_URL} - TIME_ZONE=${TIME_ZONE}