mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 15:39:11 +00:00
Fixing test deploy, adding a rate limiter to ansible nginx config.
This commit is contained in:
parent
6672cbc253
commit
0112d0d955
4
ansible/templates/nginx.conf
vendored
4
ansible/templates/nginx.conf
vendored
|
@ -1,4 +1,5 @@
|
||||||
proxy_cache_path /var/cache/lemmy_frontend levels=1:2 keys_zone=lemmy_frontend_cache:10m max_size=100m use_temp_path=off;
|
proxy_cache_path /var/cache/lemmy_frontend levels=1:2 keys_zone=lemmy_frontend_cache:10m max_size=100m use_temp_path=off;
|
||||||
|
limit_req_zone $binary_remote_addr zone=lemmy_ratelimit:10m rate=1r/s;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
@ -51,6 +52,9 @@ server {
|
||||||
# Upload limit for pictrs
|
# Upload limit for pictrs
|
||||||
client_max_body_size 20M;
|
client_max_body_size 20M;
|
||||||
|
|
||||||
|
# Rate limit
|
||||||
|
limit_req zone=lemmy_ratelimit burst=30 nodelay;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://0.0.0.0:8536;
|
proxy_pass http://0.0.0.0:8536;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
4
docker/dev/test_deploy.sh
vendored
4
docker/dev/test_deploy.sh
vendored
|
@ -9,10 +9,10 @@ export COMPOSE_DOCKER_CLI_BUILD=1
|
||||||
export DOCKER_BUILDKIT=1
|
export DOCKER_BUILDKIT=1
|
||||||
|
|
||||||
# Rebuilding dev docker
|
# Rebuilding dev docker
|
||||||
sudo docker build . -f "docker/dev/Dockerfile" -t "dessalines/lemmy:$BRANCH"
|
sudo docker build ../../ -f . -t "dessalines/lemmy:$BRANCH"
|
||||||
sudo docker push "dessalines/lemmy:$BRANCH"
|
sudo docker push "dessalines/lemmy:$BRANCH"
|
||||||
|
|
||||||
# Run the playbook
|
# Run the playbook
|
||||||
pushd ../lemmy-ansible
|
pushd ../../../lemmy-ansible
|
||||||
ansible-playbook -i test playbooks/site.yml
|
ansible-playbook -i test playbooks/site.yml
|
||||||
popd
|
popd
|
||||||
|
|
Loading…
Reference in a new issue