Skip to content

Commit

Permalink
feat: Increase nginx timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
drorganvidez committed Jul 25, 2023
1 parent 735d43c commit 45a51be
Show file tree
Hide file tree
Showing 247 changed files with 32 additions and 344,911 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ COPY migrations/ ./migrations
EXPOSE 5000

# Run the database migrations and then start the application with Gunicorn
CMD flask db upgrade && gunicorn --bind 0.0.0.0:5000 app:app --log-level debug --timeout 300 --workers 4 --threads 2
CMD flask db upgrade && gunicorn --bind 0.0.0.0:5000 app:app --log-level debug --timeout 3600 --workers 4 --threads 2
6 changes: 4 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ services:
dockerfile: Dockerfile.dev
volumes:
- .:/app
ports:
- "80:5000"
expose:
- "5000"
environment:
FLASK_ENV: development
depends_on:
Expand All @@ -28,8 +28,10 @@ services:
volumes:
- ./nginx/nginx.dev.conf:/etc/nginx/nginx.conf
ports:
- "80:80"
- "8000:8000"
depends_on:
- web
- flamapyapi

db:
Expand Down
20 changes: 20 additions & 0 deletions nginx/nginx.dev.conf
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
events {}

http {

upstream flamapyapi {
server flamapyapi:8000;
}

upstream web {
server web:5000;
}

server {
listen 8000;

location / {
proxy_pass http://flamapyapi;
}
}

server {
listen 80;



location / {
proxy_pass http://web;

# Increase proxy timeout settings
proxy_connect_timeout 3600;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
}
}
}
10 changes: 6 additions & 4 deletions nginx/nginx.prod.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ http {
}

server {
client_max_body_size 10000M;
listen 443 ssl;

client_max_body_size 10000M;

server_name www.uvlhub.io;

ssl_certificate /etc/letsencrypt/live/www.uvlhub.io/fullchain.pem;
Expand All @@ -36,9 +38,9 @@ http {
proxy_set_header X-Forwarded-Proto $scheme;

# Increase proxy timeout settings
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
proxy_connect_timeout 3600;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
}
}

Expand Down
2 changes: 1 addition & 1 deletion populate/populate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

def create_dataset_endpoint(form_data: json, filenames: List[str]):
# Endpoint URL
url = "https://www.uvlhub.io/api/v1/dataset/"
url = "http://localhost/api/v1/dataset/"

# Basic data
form_data = json.dumps(form_data)
Expand Down
143 changes: 0 additions & 143 deletions populate_prueba/populate_pueba.py

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 45a51be

Please sign in to comment.