Skip to content
Snippets Groups Projects
Verified Commit e4946846 authored by Leonidas Spyropoulos's avatar Leonidas Spyropoulos
Browse files

aurweb: setup goaurrpc


Expose aurweb RPC using goaurrpc to reduce the load on the server.
Additionally we can now geo-serve this ro reduce load and bandwidth.

Signed-off-by: default avatarLeonidas Spyropoulos <artafinde@archlinux.org>
parent c672b664
No related branches found
No related tags found
1 merge request!639aurweb: setup goaurrpc
......@@ -10,6 +10,7 @@
- python-poetry
- gcc
- pkg-config
- goaurrpc
- name: Install the cgit package
pacman:
......@@ -132,6 +133,9 @@
- name: Copy aurweb configuration file
copy: src={{ aurweb_dir }}/conf/config.defaults dest={{ aurweb_conf_dir }}/config.defaults remote_src=yes owner=root group=root mode=0644
- name: Install goaurrpc configuration
template: src=goaurrpc.conf.j2 dest=/etc/goaurrpc.conf owner=root group=root mode=0644
# Note: initdb needs the config
- name: Install custom aurweb configuration
template: src=config.j2 dest={{ aurweb_conf_dir }}/config owner=root group=root mode=0644
......@@ -321,5 +325,6 @@
- aurweb-tuvotereminder.timer
- aurweb-usermaint.timer
- aurweb.service
- goaurrpc.service
- aurweb-github-mirror.timer
when: release.changed
{
"Port": 10666,
"AurFileLocation": "{{ aurweb_dir }}/web/html/packages-meta-ext-v1.json.gz",
"MaxResults": 5000,
"RefreshInterval": 150,
"RateLimit": 4000,
"LoadFromFile": true,
"RateLimitCleanupInterval": 600,
"RateLimitTimeWindow": 86400,
"TrustedReverseProxies": [
"127.0.0.1",
"::1"
],
"EnableSSL": false,
"CertFile": "",
"KeyFile": "",
"EnableSearchCache": true,
"CacheCleanupInterval": 60,
"CacheExpirationTime": 180
}
......@@ -112,6 +112,12 @@ server {
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location /rpc {
rewrite ^/rpc.php /rpc last;
proxy_pass http://127.0.0.1:10666/rpc;
proxy_set_header X-Forwarded-For $remote_addr;
}
location / {
# Proxy over to aurweb's ASGI application.
proxy_pass http://{{ aurweb_asgi_bind }};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment