apt update
apt install python-software-properties
apt install software-properties-common
add-apt-repository -y ppa:ondrej/php
apt install mcrypt composer php7.2 php7.2-cli php7.2-common php7.2-fpm php7.2-curl php7.2-mbstring php7.2-xml php7.2-gd php7.2-pgsql
apt update
apt upgrade
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let hash = window.location.hash.replace('#', ''); | |
window.history.replaceState('', '', '#' + hash); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/var/www/*/storage/logs/*.log { | |
rotate 14 | |
daily | |
compress | |
maxage 14 | |
notifempty | |
create 644 www-data www-data | |
su www-data www-data | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crontab -l | { cat; echo "* * * * * ~/PROJECT/artisan schedule:run >> ~/PROJECT/storage/logs/crontab.log 2>&1"; } | crontab - |
Run locale -a
to list all locales (ru_RU for Russian).
Add locale if there is no needed one:
locale-gen ru_RU
locale-gen ru_RU.UTF-8
Set timezone with dpkg-reconfigure tzdata
Go to PostgreSQL CLI:
su - postgres
psql
Create user SQL
Enable supervisor service
sudo systemctl enable supervisor
sudo systemctl start supervisor
Create file /etc/supervisor/conf.d/WORKER_NAME-worker.conf
with contents:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index index.php index.html index.htm; | |
# process all non-existent files with /index.php | |
location / { | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
# php processing config | |
location ~ \.php$ { | |
try_files $uri /index.php =404; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# prevent simultaneous builds | |
while [ -f __build-lock ]; do | |
echo "Other build in progress, sleeping for 10 seconds" | |
sleep 10s | |
done | |
# just empty lock file to prevent multiple builds at the same time | |
touch __build-lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -eq 0 ]; then | |
echo "File name required" | |
exit | |
fi | |
echo -n "Bitrate (2000k): " | |
read bitrate | |
if [ "$bitrate" == "" ]; then | |
bitrate='2000' |
OlderNewer