diff --git a/docker-compose.yml b/docker-compose.yml index 4d0b0dd..d347454 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,19 +14,12 @@ services: - -vvv volumes: - cleezy_data:/tmp/ - - nginx_data:/tmp/nginx/ - ./server.py:/app/server.py - ./modules:/app/modules - ./assets:/app/assets - nginx: - container_name: cleezy-nginx - image: nginx:alpine - volumes: - - ./nginx.conf:/etc/nginx/nginx.conf volumes: cleezy_data: - nginx_data: networks: default: diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index d11a36f..0000000 --- a/nginx.conf +++ /dev/null @@ -1,41 +0,0 @@ -http { - # Define the cache path for NGINX - # levels = number of characters in subdirectory names (/tmp/nginx/1/2a/) - # keys_zone = name of the cache : maximum size of the cache info (10mb) - # max_size = maximum size of the cache content (1gb) - # inactive = cache expiration time (60 minutes) - # use_temp_path = use extra space by writing to a temp directory before moving content --buito cache (off) - proxy_cache_path /tmp/nginx levels=1:2 keys_zone=shortener_cache:10m max_size=1g inactive=60m use_temp_path=off; - - server { - listen 80 default_server; - listen [::]:80 default_server; - server_name _; - - location ~ /s/(.*)$ { - resolver 127.0.0.11 valid=15s; - proxy_set_header Host $host; - set $upstream http://app:8000; - proxy_set_header X-Original-URL $http_x_original_url; - proxy_set_header X-Base-URL $http_x_base_url; - proxy_pass $upstream; - rewrite /s/(.*) /find/$1 break; - } - - location ~ /qr/(.*)$ { - proxy_cache shortener_cache; - proxy_cache_valid 200 60m; - add_header X-Cache-Status $upstream_cache_status; - - resolver 127.0.0.11 valid=15s; - proxy_set_header Host $host; - set $upstream http://app:8000; - proxy_set_header X-Original-URL $http_x_original_url; - proxy_set_header X-Base-URL $http_x_base_url; - proxy_pass $upstream; - rewrite /qr/(.*) /qr/$1 break; - } - } -} - -events { }