microblog.pub/docs/install.md
2022-07-05 21:35:39 +02:00

1.3 KiB

Installing

[TOC]

Docker edition

TODO

Python developer edition

Assuming you have a working Python 3.10+ environment.

Setup Poetry.

curl -sSL https://install.python-poetry.org | python3 -

Clone the repository.

git clone https://git.sr.ht/~tsileo/microblog.pub testing.microblog.pub

Install deps.

poetry install

Setup config.

poetry run inv configuration-wizard

Grab your virtualenv path.

poetry env info

Run the two processes with supervisord.

VENV_DIR=/home/ubuntu/.cache/pypoetry/virtualenvs/microblogpub-chx-y1oE-py3.10 poetry run supervisord -c misc/supervisord.conf -n

You will also want to setup a reverse proxy like Nginx, see uvicorn documentation:

server {
    client_max_body_size 4G;

    location / {
      proxy_set_header Host $http_host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;
      proxy_redirect off;
      proxy_buffering off;
      proxy_pass http://localhost:8000;
    }

    # [...]
}