Each file should be put in /usr/local/vesta/data/templates/web/apache2
Then, when you edit your domain/site, you can change the web template to Drupal8 and just upload your whole project into public_html
import psutil | |
def bytes2human(n): | |
# >>> bytes2human(10000) | |
# '9.8K' | |
# >> bytes2human(100001221) | |
# '95.4M' | |
symbols = ('K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y') | |
prefix = {} | |
for i, s in enumerate(symbols): |
#!/bin/bash | |
# -------------------- | |
# arguments definition | |
# -------------------- | |
V_USER=$1 | |
V_PASSWORD=$(openssl rand -base64 12) | |
# ------------- |
#!/bin/bash | |
# Location to place backups. | |
backup_dir="/var/backups/databases/" | |
nightly_dir="/var/backups/databases/latest/" | |
#String to append to the name of the backup files | |
backup_date=`date +%d-%m-%Y` | |
#Numbers of days you want to keep copie of your databases | |
number_of_days=15 | |
databases=`psql -l -t | cut -d'|' -f1 | sed -e 's/ //g' -e '/^$/d'` | |
for i in $databases; do if [ "$i" != "postgres" ] && [ "$i" != "template0" ] && [ "$i" != "template1" ] && [ "$i" != "template_postgis" ]; then |
# DB Version: 12 | |
# OS Type: linux | |
# DB Type: oltp | |
# Total Memory (RAM): 256 GB | |
# Number of Connections: 1000 | |
max_connections = 1000 | |
shared_buffers = 64GB | |
effective_cache_size = 128GB | |
work_mem = 64554kB |
#!/bin/sh | |
# | |
# BUG: zmcertmgr doesn't work with ellipitical curve certs | |
# Ref: https://forums.zimbra.org/viewtopic.php?f=15&t=69645 | |
# | |
zmcertmgr=/opt/zimbra/bin/zmcertmgr | |
cp $zmcertmgr $zmcertmgr.bak | |
sed -i -e 's/$self->run("$ssl rsa -noout -modulus -in '$keyf'/$self->run("$ssl pkey -pubout -in '$keyf'/g' \ | |
-e 's/$self->run("$ssl x509 -noout -modulus -in '$crtf'/$self->run("$ssl x509 -noout -pubkey -in '$crtf'/g' $zmcertmgr |
# best practice: linux | |
nano ~/.pgpass | |
*:5432:*:username:password | |
chmod 0600 ~/.pgpass | |
# best practice: windows | |
edit %APPDATA%\postgresql\pgpass.conf | |
*:5432:*:username:password | |
# linux |
<?php | |
namespace Database\Seeders; | |
use Illuminate\Database\Seeder; | |
use App\Models\Transaction; | |
class TransactionSeeder extends Seeder | |
{ | |
/** | |
* Run the database seeds. | |
* | |
* @return void |
Each file should be put in /usr/local/vesta/data/templates/web/apache2
Then, when you edit your domain/site, you can change the web template to Drupal8 and just upload your whole project into public_html
--- | |
- hosts: all | |
tasks: | |
- name: ensure nginx is at the latest version | |
apt: name=nginx state=latest | |
become: yes | |
- name: start nginx | |
service: | |
name: nginx | |
state: started |
--- | |
- name: Linux Create User and Upload User Public keys | |
hosts: test | |
#remote_user: xxxx | |
#sudo: yes | |
vars: | |
user_1: devuser | |
tasks: | |
- name: Make sure we have a 'wheel' group | |
group: |