From c0138871ad2b20818f384978aa1e654c949a6dd5 Mon Sep 17 00:00:00 2001 From: Winston H <56998716+winstxnhdw@users.noreply.github.com> Date: Mon, 17 Jun 2024 06:09:01 +0800 Subject: [PATCH] feat: remove rate limiter --- Caddyfile | 9 --------- Dockerfile | 1 - Dockerfile.build | 5 +---- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/Caddyfile b/Caddyfile index 55145c7..12e9e65 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,5 +1,4 @@ { - order rate_limit before basicauth order cache before rewrite cache } @@ -13,14 +12,6 @@ } } - rate_limit { - zone dynamic_example { - key {remote_host} - events {$EVENTS_PER_WINDOW} - window 30s - } - } - handle_path /api/* { reverse_proxy http://localhost:{$SERVER_PORT} } diff --git a/Dockerfile b/Dockerfile index 5803c3b..91cbb56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,5 @@ ENV APP_PORT 7860 ENV OMP_NUM_THREADS 2 ENV CT2_USE_EXPERIMENTAL_PACKED_GEMM 1 ENV CT2_FORCE_CPU_ISA AVX512 -ENV EVENTS_PER_WINDOW 5 EXPOSE $APP_PORT diff --git a/Dockerfile.build b/Dockerfile.build index 3cc3db4..34416f2 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -16,9 +16,7 @@ RUN poetry install --without=dev --no-root FROM caddy:builder-alpine as caddy-builder -RUN xcaddy build \ - --with github.com/caddyserver/cache-handler \ - --with github.com/mholt/caddy-ratelimit +RUN xcaddy build --with github.com/caddyserver/cache-handler FROM python:slim @@ -27,7 +25,6 @@ ENV HOME /home/user ENV PYTHONUNBUFFERED 1 ENV PYTHONDONTWRITEBYTECODE 1 ENV SERVER_PORT 5000 -ENV EVENTS_PER_WINDOW 100000 RUN useradd -m -u 1000 user