Skip to content

bocharovatd/web_sem1_task1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Askme service

Настройки nginx

upstream askme {
    server 127.0.0.1:8000;
}

server {
    listen 80 default_server;
    server_name askme.com;

    access_log /var/log/nginx/askme.access.log;
    error_log /var/log/nginx/askme.error.log;

    location / {
        proxy_pass http://askme;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_cache mycache;
        proxy_cache_valid 200 302 10m;
        proxy_cache_valid 404      1m;
    }

    location ^~ /upload/ {
        root /home/user/projects/vk/web_task1/;
        add_header Cache-Control "public, max-age=2592000";
        gzip on;
    }

    location ^~ /static/ {
        root /home/user/projects/vk/web_task1/;
        add_header Cache-Control "public, max-age=2592000";
        gzip on;
    }

    location ~* \.(js|css|png|jpg)$ {
        root /home/user/projects/vk/web_task1/static/;
        add_header Cache-Control "public, max-age=2592000";
        gzip on;
    }
}

Настройки cron

* * * * * cd /home/user/projects/vk/web_task1 && source venv/bin/activate && python manage.py generate_popular_tags
* * * * * cd /home/user/projects/vk/web_task1 && source venv/bin/activate && python manage.py generate_best_members

Centrifugo

./centrifugo --config=confug.json

Запуск через gunicorn

gunicorn askme.wsgi

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published