Added elkarbackup CT

This commit is contained in:
2021-11-18 16:08:24 +00:00
parent f1a507cfa1
commit c043c4825c
23 changed files with 377 additions and 4 deletions

View File

@@ -0,0 +1 @@
* * * * * APP_ENV=prod APP_DEBUG=0 php /opt/elkarbackup/srv/bin/console elkarbackup:tick

View File

@@ -0,0 +1,27 @@
parameters:
database_driver: pdo_mysql
database_host: DBServer
database_port: null
database_name: DBName
database_user: DBUser
database_password: DBPass
mailer_transport: smtp
mailer_host: localhost
mailer_user: null
mailer_password: null
locale: en
secret: ElkarToken
database_path: null
upload_dir: /opt/elkarbackup/uploads
public_key: /opt/elkarbackup/home/.ssh/id_rsa.pub
max_log_age: P1Y
tmp_dir: /tmp
rsnapshot: /usr/bin/rsnapshot
warning_load_level: 0.8
pagination_lines_per_page: 20
url_prefix: null
disable_background: true
mailer_from: null
home: /opt/elkarbackup/home
max_parallel_jobs: 1
post_on_pre_fail: true

View File

@@ -0,0 +1,56 @@
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 8m;
large_client_header_buffers 4 4k;
server_names_hash_bucket_size 64;
root /usr/share/nginx/html;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log off;
error_log /var/log/nginx/error.log;
#Server config for RainLoop
server {
listen 80 default_server;
listen [::]:80 default_server;
root /opt/elkarbackup/srv/public;
index index.html index.php;
server_name _;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass unix:/run/php-fpm7/php-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param APP_ENV prod;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
internal;
}
location ~ \.php$ {
return 404;
}
}
}

View File

@@ -0,0 +1,15 @@
[elkarbackup]
user = nginx
group = nginx
listen = /run/php-fpm7/php-fpm.sock
listen.owner = nginx
listen.group = nginx
php_admin_value[error_log] = /var/log/php-fpm.error.log
php_admin_value [date.timezone] = Europe/Amsterdam
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chdir = /

View File

@@ -0,0 +1,2 @@
[Date]
date.timezone = Europe/Amsterdam

View File

@@ -0,0 +1,3 @@
Cmnd_Alias ELKARBACKUP_SCRIPTS=/opt/elkarbackup/uploads/*
Defaults!ELKARBACKUP_SCRIPTS env_keep += "ELKARBACKUP_LEVEL ELKARBACKUP_EVENT ELKARBACKUP_URL ELKARBACKUP_ID ELKARBACKUP_PATH ELKARBACKUP_STATUS ELKARBACKUP_CLIENT_NAME ELKARBACKUP_JOB_NAME ELKARBACKUP_OWNER_EMAIL ELKARBACKUP_RECIPIENT_LIST ELKARBACKUP_CLIENT_TOTAL_SIZE ELKARBACKUP_JOB_TOTAL_SIZE ELKARBACKUP_JOB_RUN_SIZE ELKARBACKUP_CLIENT_STARTTIME ELKARBACKUP_CLIENT_ENDTIME ELKARBACKUP_JOB_STARTTIME ELKARBACKUP_JOB_ENDTIME ELKARBACKUP_SSH_ARGS"
nginx ALL = NOPASSWD: ELKARBACKUP_SCRIPTS