Compare commits
No commits in common. "14159249ef14eaf1dec3a70fbf7db35de906a347" and "2e91b767472a36dcfd76aad8dd4a9df35c780fd6" have entirely different histories.
14159249ef
...
2e91b76747
23
apache.cf
23
apache.cf
|
@ -339,7 +339,6 @@ classes:
|
||||||
"delete" expression => $(site[disable]);
|
"delete" expression => $(site[disable]);
|
||||||
"use_ssl" expression => $(site[ssl]);
|
"use_ssl" expression => $(site[ssl]);
|
||||||
"use_certbot" expression => strcmp("certbot","$(site[ssl_cert])");
|
"use_certbot" expression => strcmp("certbot","$(site[ssl_cert])");
|
||||||
"do_logrotate" expression => $(site[logrotate]);
|
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
# "email":$(apache.admin_email),
|
# "email":$(apache.admin_email),
|
||||||
|
@ -351,10 +350,7 @@ vars:
|
||||||
"doc_root":"$(apache.www_dir)/$(site_param[domain])",
|
"doc_root":"$(apache.www_dir)/$(site_param[domain])",
|
||||||
"doc_root_options":"Indexes FollowSymLinks",
|
"doc_root_options":"Indexes FollowSymLinks",
|
||||||
"php":true,
|
"php":true,
|
||||||
"php_handler":"$(apache.default_php_handler)",
|
"php_handler":"$(apache.default_php_handler)"
|
||||||
"logging80":true,
|
|
||||||
"logging443":true,
|
|
||||||
"logrotate":false,
|
|
||||||
}
|
}
|
||||||
';
|
';
|
||||||
|
|
||||||
|
@ -424,16 +420,6 @@ methods:
|
||||||
"any" usebundle => restart_apache("$(site[domain])"),
|
"any" usebundle => restart_apache("$(site[domain])"),
|
||||||
depends_on => {"vhost_cfg_done$(site[domain])" };
|
depends_on => {"vhost_cfg_done$(site[domain])" };
|
||||||
|
|
||||||
"any" usebundle => install_logrot;
|
|
||||||
|
|
||||||
files:
|
|
||||||
do_logrotate::
|
|
||||||
"$(logrot.dir)/$(site[domain])"
|
|
||||||
create => "true",
|
|
||||||
edit_defaults => backup("false"),
|
|
||||||
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/httpd-weblogrot.mustache",
|
|
||||||
template_method => "mustache";
|
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
|
|
||||||
|
|
||||||
|
@ -446,11 +432,6 @@ commands:
|
||||||
|
|
||||||
|
|
||||||
reports:
|
reports:
|
||||||
# "SITE: $(site[domain]): $(site[logrotate])";
|
|
||||||
# !do_logrotate::
|
|
||||||
# "LOGOROOTATE FOR $(site[domain]): FALSE";
|
|
||||||
# do_logrotate::
|
|
||||||
# "LOGOROOTATE FOR $(site[domain]): TRUE";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -502,7 +483,7 @@ any::
|
||||||
}';
|
}';
|
||||||
|
|
||||||
"template_file"
|
"template_file"
|
||||||
string => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/httpd-weblogrot-matomo.mustache";
|
string => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/weblogrot.mustache";
|
||||||
|
|
||||||
methods:
|
methods:
|
||||||
"any" usebundle => install_logrot;
|
"any" usebundle => install_logrot;
|
||||||
|
|
30
lib.cf
30
lib.cf
|
@ -408,33 +408,3 @@ files:
|
||||||
classes => results("namespace","etc_hosts");
|
classes => results("namespace","etc_hosts");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bundle agent cron
|
|
||||||
{
|
|
||||||
vars:
|
|
||||||
"cron_d" string => "/etc/cron.d";
|
|
||||||
freebsd::
|
|
||||||
"cron_d" string => "/usr/local/etc/cron.d";
|
|
||||||
files:
|
|
||||||
"$(cron_d)/."
|
|
||||||
create => "true",
|
|
||||||
handle => "cron_d_created";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bundle agent create_cron_job(name,time,command)
|
|
||||||
{
|
|
||||||
methods:
|
|
||||||
"any" usebundle => cron;
|
|
||||||
files:
|
|
||||||
"$(cron.cron_d)/$(name)"
|
|
||||||
create => "true",
|
|
||||||
content => "#
|
|
||||||
# Managed by CFEngin
|
|
||||||
#
|
|
||||||
|
|
||||||
$(time) $(command)
|
|
||||||
",
|
|
||||||
depends_on => {"cron_d_created"};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -10,21 +10,16 @@ vars:
|
||||||
};
|
};
|
||||||
freebsd::
|
freebsd::
|
||||||
"dir" string => "/usr/local/etc/logrotate.d";
|
"dir" string => "/usr/local/etc/logrotate.d";
|
||||||
"cmd" string => "/usr/local/sbin/logrotate";
|
|
||||||
"conf" string => "/usr/local/etc/logrotate.conf";
|
|
||||||
debian::
|
debian::
|
||||||
"dir" string => "/etc/logrotate.d";
|
"dir" string => "/etc/logrotate.d";
|
||||||
centos::
|
centos::
|
||||||
"dir" string => "/etc/logrotate.d";
|
"dir" string => "/etc/logrotate.d";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bundle agent install_logrot
|
bundle agent install_logrot
|
||||||
{
|
{
|
||||||
methods:
|
methods:
|
||||||
"any" usebundle => wmde_install_packages(@(logrot.pkgs),"logrotate");
|
"any" usebundle => wmde_install_packages(@(logrot.pkgs),"logrot");
|
||||||
freebsd::
|
|
||||||
"any" usebundle => create_cron_job("logrotate","0 0 * * *","root $(logrot.cmd) $(logrot.conf)");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,95 +0,0 @@
|
||||||
#
|
|
||||||
# Sample Configuration for Gitea using SQLite
|
|
||||||
#
|
|
||||||
# For information on the available settings, consult the online
|
|
||||||
# documentation, or see the accompanying file app.ini.defaults, which
|
|
||||||
# contains the settings incorporated into the gitea binary.
|
|
||||||
#
|
|
||||||
# This sample configuration runs Gitea with a local database. Before
|
|
||||||
# running this configuration, make sure to change the INTERNAL_TOKEN,
|
|
||||||
# JWT_SECRET, and SECRET_KEY variables. SECRET_KEY is a password of your
|
|
||||||
# choosing, INTERNAL_TOKEN is a 64-byte random number in BASE64 encoding,
|
|
||||||
# JWT_SECRET is a 32-byte random number in BASE64 encoding.
|
|
||||||
#
|
|
||||||
# You can generate the token using for example:
|
|
||||||
# openssl rand -base64 64
|
|
||||||
#
|
|
||||||
# You can let Gitea add these to the config for you; you need to make
|
|
||||||
# app.ini writeable by the git user.
|
|
||||||
#
|
|
||||||
# There are no pre-configured users; the first user to register becomes an
|
|
||||||
# admin. In this sample configuration, the HTTP server only listens on
|
|
||||||
# localhost.
|
|
||||||
#
|
|
||||||
# If you'd rather use the web-based installer, remove this conf/app.ini file
|
|
||||||
# and make /usr/local/etc/gitea/conf writeable to the git user.
|
|
||||||
|
|
||||||
APP_NAME = Gitea: Git with a cup of tea
|
|
||||||
RUN_USER = git
|
|
||||||
RUN_MODE = prod
|
|
||||||
|
|
||||||
[database]
|
|
||||||
DB_TYPE = sqlite3
|
|
||||||
HOST = 127.0.0.1:3306
|
|
||||||
NAME = gitea
|
|
||||||
PASSWD =
|
|
||||||
PATH = /var/gitea/gitea.db
|
|
||||||
SSL_MODE = disable
|
|
||||||
USER = root
|
|
||||||
|
|
||||||
[indexer]
|
|
||||||
ISSUE_INDEXER_PATH = /var/gitea/indexers/issues.bleve
|
|
||||||
|
|
||||||
[log]
|
|
||||||
ROOT_PATH = /var/gitea/log
|
|
||||||
MODE = file
|
|
||||||
LEVEL = Info
|
|
||||||
|
|
||||||
[mailer]
|
|
||||||
ENABLED = false
|
|
||||||
|
|
||||||
[oauth2]
|
|
||||||
JWT_SECRET = D56bmu6xCtEKs9vKKgMKnsa4X9FDwo64HVyaS4fQ4mY
|
|
||||||
|
|
||||||
[picture]
|
|
||||||
AVATAR_UPLOAD_PATH = /var/gitea/data/avatars
|
|
||||||
DISABLE_GRAVATAR = false
|
|
||||||
ENABLE_FEDERATED_AVATAR = false
|
|
||||||
|
|
||||||
[repository]
|
|
||||||
ROOT = /var/gitea/repos
|
|
||||||
# Gitea's default is 'bash', so if you have bash installed, you can comment
|
|
||||||
# this out.
|
|
||||||
SCRIPT_TYPE = sh
|
|
||||||
DEFAULT_BRANCH = master
|
|
||||||
|
|
||||||
[repository.upload]
|
|
||||||
TEMP_PATH = /var/gitea/data/tmp/uploads
|
|
||||||
|
|
||||||
[security]
|
|
||||||
INSTALL_LOCK = true
|
|
||||||
INTERNAL_TOKEN = 1FFhAklka01JhgJTRUrFujWYiv4ijqcTIfXJ9o4n1fWxz+XVQdXhrqDTlsnD7fvz7gugdhgkx0FY2Lx6IBdPQw==
|
|
||||||
SECRET_KEY = ChangeMeBeforeRunning
|
|
||||||
IMPORT_LOCAL_PATHS = true
|
|
||||||
|
|
||||||
[session]
|
|
||||||
PROVIDER = file
|
|
||||||
PROVIDER_CONFIG = /var/gitea/data/sessions
|
|
||||||
|
|
||||||
[server]
|
|
||||||
DOMAIN = localhost
|
|
||||||
HTTP_ADDR = 0.0.0.0
|
|
||||||
HTTP_PORT = 3033
|
|
||||||
ROOT_URL = https://git.planix.org/
|
|
||||||
DISABLE_SSH = false
|
|
||||||
SSH_DOMAIN = %(DOMAIN)s
|
|
||||||
SSH_PORT = 22
|
|
||||||
OFFLINE_MODE = false
|
|
||||||
APP_DATA_PATH = /var/gitea/data
|
|
||||||
|
|
||||||
[service]
|
|
||||||
REGISTER_EMAIL_CONFIRM = false
|
|
||||||
ENABLE_NOTIFY_MAIL = false
|
|
||||||
DISABLE_REGISTRATION = false
|
|
||||||
ENABLE_CAPTCHA = true
|
|
||||||
REQUIRE_SIGNIN_VIEW = false
|
|
|
@ -23,10 +23,8 @@
|
||||||
RewriteRule "^/.well-known/acme-challenge/" - [L]
|
RewriteRule "^/.well-known/acme-challenge/" - [L]
|
||||||
DocumentRoot "{{vars.apache_vhost.site.doc_root}}"
|
DocumentRoot "{{vars.apache_vhost.site.doc_root}}"
|
||||||
ServerAlias {{#vars.apache_vhost.site.aliases}}{{.}} {{/vars.apache_vhost.site.aliases}}
|
ServerAlias {{#vars.apache_vhost.site.aliases}}{{.}} {{/vars.apache_vhost.site.aliases}}
|
||||||
{{#vars.apache_vhost.site.logging80}}
|
|
||||||
ErrorLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-error.log"
|
ErrorLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-error.log"
|
||||||
CustomLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-access.log" combined
|
CustomLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-access.log" combined
|
||||||
{{/vars.apache_vhost.site.logging80}}
|
|
||||||
{{vars.apache_vhost.site.raw}}
|
{{vars.apache_vhost.site.raw}}
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
{{/vars.apache_vhost.site.ssl}}
|
{{/vars.apache_vhost.site.ssl}}
|
||||||
|
@ -46,11 +44,8 @@
|
||||||
DocumentRoot "{{vars.apache_vhost.site.doc_root}}"
|
DocumentRoot "{{vars.apache_vhost.site.doc_root}}"
|
||||||
ServerName {{vars.apache_vhost.site.domain}}
|
ServerName {{vars.apache_vhost.site.domain}}
|
||||||
ServerAlias {{#vars.apache_vhost.site.aliases}}{{.}} {{/vars.apache_vhost.site.aliases}}
|
ServerAlias {{#vars.apache_vhost.site.aliases}}{{.}} {{/vars.apache_vhost.site.aliases}}
|
||||||
|
|
||||||
{{#vars.apache_vhost.site.logging443}}
|
|
||||||
ErrorLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-error.log"
|
ErrorLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-error.log"
|
||||||
CustomLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-access.log" combined
|
CustomLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-access.log" combined
|
||||||
{{/vars.apache_vhost.site.logging443}}
|
|
||||||
# SSL
|
# SSL
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
# SSLCertificateFile {{vars.certbot.certbot_dir}}/live/{{vars.apache_vhost.site.domain}}/fullchain.pem
|
# SSLCertificateFile {{vars.certbot.certbot_dir}}/live/{{vars.apache_vhost.site.domain}}/fullchain.pem
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
{{vars.apache.log_dir}}/{{vars.apache_matomo.site.domain}}-access.log {
|
|
||||||
rotate 30
|
|
||||||
size 100k
|
|
||||||
|
|
||||||
postrotate
|
|
||||||
service {{vars.apache.service_name}} restart ; {{{vars.apache_matomo.logger_script}}}
|
|
||||||
endscript
|
|
||||||
}
|
|
||||||
|
|
||||||
{{vars.apache.log_dir}}/{{vars.apache_matomo.site.domain}}-error.log {
|
|
||||||
rotate 30
|
|
||||||
size 100k
|
|
||||||
|
|
||||||
postrotate
|
|
||||||
service {{vars.apache.service_name}} restart
|
|
||||||
endscript
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-access.log {
|
|
||||||
rotate 30
|
|
||||||
size 100k
|
|
||||||
|
|
||||||
postrotate
|
|
||||||
service {{vars.apache.service_name}} restart
|
|
||||||
endscript
|
|
||||||
}
|
|
||||||
|
|
||||||
{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-error.log {
|
|
||||||
rotate 30
|
|
||||||
size 100k
|
|
||||||
|
|
||||||
postrotate
|
|
||||||
service {{vars.apache.service_name}} restart
|
|
||||||
endscript
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue