Skip to content

Commit

Permalink
feat: remove rate limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw authored Jun 16, 2024
1 parent 844a566 commit c013887
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
9 changes: 0 additions & 9 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
order rate_limit before basicauth
order cache before rewrite
cache
}
Expand All @@ -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}
}
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 1 addition & 4 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit c013887

Please sign in to comment.