diff --git a/roles/copr/frontend-cloud/files/cron.daily/copr-frontend-optional b/roles/copr/frontend-cloud/files/cron.daily/copr-frontend-optional index 92ca1980d2..dbcd79595c 100755 --- a/roles/copr/frontend-cloud/files/cron.daily/copr-frontend-optional +++ b/roles/copr/frontend-cloud/files/cron.daily/copr-frontend-optional @@ -7,3 +7,4 @@ runuser -c 'copr-frontend notify_outdated_chroots' - copr-fe runuser -c 'copr-frontend delete_outdated_chroots' - copr-fe +/usr/bin/bash /usr/libexec/copr_dump_db.sh diff --git a/roles/copr/frontend-cloud/tasks/psql_setup.yml b/roles/copr/frontend-cloud/tasks/psql_setup.yml index 56b8e9d1b8..6bbc8d898c 100644 --- a/roles/copr/frontend-cloud/tasks/psql_setup.yml +++ b/roles/copr/frontend-cloud/tasks/psql_setup.yml @@ -3,6 +3,15 @@ with_items: - "postgresql-server" - "postgresql-contrib" + - "httpd-filesystem" + +- name: directory for postgresql dumps + file: state=directory path=/var/www/html/db_dumps/ + owner=root mode=755 + +- name: allow postgres writing to db_dumps dir + acl: path=/var/www/html/db_dumps/ + entity=postgres permissions=rwx etype=user state=present - name: See if PostgreSQL is initialized stat: path=/var/lib/pgsql/data/PG_VERSION diff --git a/roles/copr/frontend-cloud/templates/httpd/coprs.conf b/roles/copr/frontend-cloud/templates/httpd/coprs.conf index 49ee8d2211..3dba7b5535 100644 --- a/roles/copr/frontend-cloud/templates/httpd/coprs.conf +++ b/roles/copr/frontend-cloud/templates/httpd/coprs.conf @@ -2,6 +2,7 @@ NameVirtualHost *:80 LoadModule wsgi_module modules/mod_wsgi.so WSGISocketPrefix /var/run/wsgi Alias /robots.txt /var/www/html/robots.txt +Alias "/db_dumps/" "/var/www/html/db_dumps" WSGIDaemonProcess 127.0.0.1 user=copr-fe group=copr-fe threads=15 display-name=other maximum-requests=8000 graceful-timeout=20 WSGIDaemonProcess api user=copr-fe group=copr-fe threads=15 display-name=api maximum-requests=8000 graceful-timeout=20