2026-05-31 13:19:05 +05:00
2026-05-29 10:34:16 +00:00
2025-07-06 14:09:01 +07:00
2026-05-29 10:34:16 +00:00
2026-05-30 16:58:45 +00:00
2025-07-05 22:22:53 +07:00
2025-07-06 14:09:01 +07:00
2026-05-29 10:34:16 +00:00
2026-05-29 10:34:16 +00:00
2025-07-05 22:22:53 +07:00
2026-05-31 13:19:05 +05:00

Pechatalka

Site and chat-robot constructor for the Svoboda typography

Installation

Before process any command think about what it does and whether the paths are specified correctly

NGINX

Create the NGINX server

You can copy an example of the server file from here: /examples/nginx/pechatalka.conf
I prefer to rename nginx config files to domain names. For example: pechatalka.kodorvan.tech

The file will be half commented out specifically to start the server for generating the TLS/SSL certificate

  1. cd /examples/nginx
  2. sudo cp pechatalka.conf /etc/nginx/sites-avaiable/pechatalka.conf
  3. sudo nvim /etc/nginx/sites-avaiable/pechatalka.conf
    3.1. Customize the file according to your requirements
  4. sudo ln -s /etc/nginx/sites-avaiable/pechatalka.conf /etc/nginx/sites-enabled/pechatalka.conf
  5. sudo nginx -t
    5.1. Make sure that NGINX does not throw errors, otherwise proceed to the instructions for generate a TLS/SSL certificate
  6. sudo service nginx restart

Add mime-type recognition for javascript modules

Edit the file: /etc/nginx/mime.types
From: application/javascript js;
To: application/javascript js mjs;

Generate a TLS/SSL sertificate (via certbot for ubuntu)

  1. sudo apt install certbot python3-certbot-nginx
  2. sudo certbot certonly --nginx
    The domain must already be bound to the IP-address of the server by CNAME, A or AAAA record
  3. Uncomment and reconfigure the nginx server file
  4. sudo nginx -t
    4.1. Make sure that NGINX does not throw errors
  5. sudo service nginx restart

Set up firewall rules for HTTP and HTTPS requests (for ubuntu)

  1. sudo ufw allow "NGINX Full"
    1.1. Make sure that the port for SSH connection is open
  2. sudo ufw allow 22
    2.1. Use your SSH port instead of 22
  3. sudo ufw enable

SystemD (or any alternative you like)

You can copy an example of the systemd file from here: /examples/systemd/arming.service

  1. cd examples/systemd
  2. sudo cp pechatalka.service /etc/systemd/system/pechatalka.service && sudo chmod +x /etc/systemd/system/pechatalka.service
  3. sudo nvim /etc/systemd/system/pechatalka.service
    3.1. Customize the file according to your requirements
  4. sudo systemctl daemon-reload
  5. sudo systemctl enable pechatalka
Description
Chat-robot constructor for the Svoboda typography
https://t.me/pechatalka_bot Readme WTFPL 53 MiB
Languages
PHP 59.5%
CSS 18.2%
JavaScript 16.2%
HTML 5.5%
Shell 0.6%