1.2.3 Установка - Xoma163/petrovich GitHub Wiki

Раздел находится в разработке

systemd config example

[Unit]
Description=petrovich

[Service]
User={YOUR_USER}
Restart=always
RestartSec=5
Nice=1
SuccessExitStatus=0 1
WorkingDirectory=/{YOUR_PATH}/
ExecStart=/{YOUR_USER}/venv/bin/uwsgi --ini config/uwsgi/uwsgi.ini
ExecStop=/{YOUR_USER}/venv/bin/uwsgi --stop config/petrovich.pid

[Install]
WantedBy=multi-user.target

nginx config example

upstream petrovich_django {
    server unix:///{YOUR_PROJECT_PATH}/config/petrovich.sock;
}

server {
    server_name     <YOUR_SITE>;
    listen 443 ssl;

    ; YOUR SSL CERTIFICATES
    ssl_certificate /etc/letsencrypt/live/<YOUR_SITE>/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/<YOUR_SITE>/privkey.pem;

    add_header Strict-Transport-Security "max-age=1; includeSubdomains; preload";
    charset     utf-8;
    client_max_body_size 75M;

    location /media  {
        alias /{YOUR_PROJECT_PATH}/media;
    }
    location /static {
        alias /{YOUR_PROJECT_PATH}/static;
    }

    location / {
        uwsgi_pass  petrovich_django;
        include     /{YOUR_PROJECT_PATH}/config/uwsgi/uwsgi_params;
    }
}

Установка проекта

ToDo:

⚠️ **GitHub.com Fallback** ⚠️