Skip to content

politsin/srvr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Dec 16, 2024
4c3cf87 · Dec 16, 2024
Dec 12, 2024
Dec 16, 2024
May 28, 2024
Nov 13, 2023
Apr 19, 2024
Nov 13, 2023
Apr 24, 2024
May 28, 2024

Repository files navigation

SRVR

TODO:

  • TLS users: (999:999)
  • File mon
  • LogRotate: nginx, exim, ...
  • CP if exists
  • rabbitmq init.sh
  • Docker: /etc/docker/daemon.json

Cron

# Edit this file to introduce tasks to be run by cron.

# Dev: phpcs phpcbf vscode
* * * * * ps -aux | grep phpcs | awk '{print $2}' | xargs kill
* * * * * ps -aux | grep phpcbf | awk '{print $2}' | xargs kill
30 7,12,18 * * * ps -aux | grep vscode | awk '{print $2}' | xargs kill

# Apps
0 10 * * * /usr/bin/docker start certbot -a > /opt/apps/certbot/log/cron.log
30 9 * * * /usr/bin/docker exec -i docker-proxy /usr/sbin/nginx -s reload > /opt/docker-proxy/reload-log.log

# Custom

Dokcer-images

Debian / Ubuntu

apt update && apt install git -y
cd /opt && git clone https://github.com/politsin/srvr
cd srvr
./init.sh

OrangePi Zero

Todo

https://askubuntu.com/questions/1472428/why-i-got-failed-to-allocate-directory-watch-too-many-open-files

sysctl fs.inotify
fs.inotify.max_queued_events = 16384
`fs.inotify.max_user_instances` = 128
fs.inotify.max_user_watches = 65536
  • sysctl fs.inotify
  • fs.inotify.max_user_instances = 128
  • sysctl -w fs.inotify.max_user_instances=256
  • sysctl -w fs.inotify.max_user_watches=256 sysctl -w fs.inotify.max_user_watches=6553699 sysctl -w fs.inotify.max_user_instances=1024

Exim Update

SET 4 APP

cd /opt/srvr
git pull
cat .env.local
docker stop exim
docker rm exim
mv /opt/apps/exim /opt/apps/exim-old
./console.php setapp
cd /opt/apps/exim
mv compose.yml docker-compose.yml
./start.sh
docker ps | grep exim

PHP-test

<?php
print "hello";
$to = "politsin@gmail.com";
$subject = "server test";
$message = "test psss";
$additional_headers = [];
$additional_params = "";
$mail = mail($to, $subject, $message);
print ">$mail<";

Docker-REST Update

  1. меняем nginx.conf
  2. выполняем команды
cd /opt/docker-rest
docker pull nginx:alpine
./start.sh

Debian update

debian.org - последняя версия 12 - bookworm

lsb_release -a
apt update
apt upgrade -y
# Keep the local version currently installed
nano /etc/apt/sources.list
cat /etc/apt/sources.list
apt update
apt upgrade --without-new-pkgs -y
# Restart services without asking
apt full-upgrade -y
apt --purge autoremove -y
lsb_release -a
cat /etc/debian_version

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published