fix(Docker): use cert chain for nginx

Additionally, simplify some of the certificate generation
scripts and rename `ca.ext` to `localhost.ext`.

Certificates should be regenerated as of this commit.
Users can run `rm -rf ./cache/*` to clear out any existing
certs, which will cause the `ca` service to regenerate them.

Additionally, since Docker infrastructure has been modified,
a new `aurweb:latest` image will need to be built.

See https://gitlab.archlinux.org/archlinux/aurweb/-/wikis/Docker

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-09-13 14:16:44 -07:00
parent ab8a44cede
commit 3ea515d705
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
3 changed files with 47 additions and 24 deletions

View file

@ -12,7 +12,8 @@ sed -ri 's/^;?(password) = .+/\1 = aur/' conf/config
sed -ri "s|^(aur_location) = .+|\1 = https://localhost:8444|" conf/config
sed -ri 's/^(disable_http_login) = .+/\1 = 1/' conf/config
cp -vf /cache/localhost.cert.pem /etc/ssl/certs/localhost.cert.pem
cat /cache/localhost.cert.pem /cache/ca.root.pem \
> /etc/ssl/certs/localhost.cert.pem
cp -vf /cache/localhost.key.pem /etc/ssl/private/localhost.key.pem
cp -vf /docker/config/nginx.conf /etc/nginx/nginx.conf