mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(docker): host gzip archive downloads
- added config option [mkpkglists] archivedir - created by mkpkglists Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
abbecf5194
commit
4f7aeafa8d
6 changed files with 38 additions and 6 deletions
|
@ -94,7 +94,24 @@ http {
|
|||
ssl_certificate /etc/ssl/certs/web.cert.pem;
|
||||
ssl_certificate_key /etc/ssl/private/web.key.pem;
|
||||
|
||||
root /aurweb/web/html;
|
||||
location ~ ^/.*\.gz$ {
|
||||
# Override mime type to text/plain.
|
||||
types { text/plain gz; }
|
||||
default_type text/plain;
|
||||
|
||||
# Filesystem location of .gz archives.
|
||||
root /var/lib/aurweb/archives;
|
||||
|
||||
# When we match this block, fix-up trying without a trailing slash.
|
||||
try_files $uri $uri/ =404;
|
||||
|
||||
# Caching headers.
|
||||
expires max;
|
||||
add_header Content-Encoding gzip;
|
||||
add_header Cache-Control public;
|
||||
add_header Last-Modified "";
|
||||
add_header ETag "";
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri @proxy_to_app;
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
|
||||
for archive in packages pkgbase users packages-meta-v1.json packages-meta-ext-v1.json; do
|
||||
ln -vsf /var/lib/aurweb/archives/${archive}.gz /aurweb/web/html/${archive}.gz
|
||||
done
|
||||
|
||||
# Setup a config for our mysql db.
|
||||
cp -vf conf/config.dev conf/config
|
||||
sed -i "s;YOUR_AUR_ROOT;$(pwd);g" conf/config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue