mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
change(docker): use ./data instead of ./cache
For the `git` service, ./data is always used to provide an optional overriding of ssh host keys. In aur-dev production containers, most services which use the data mount use an internal Docker `data` volume instead. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
604901fe74
commit
d4d9f50b8f
10 changed files with 56 additions and 57 deletions
|
@ -1,15 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
CERT=/cache/localhost.cert.pem
|
||||
KEY=/cache/localhost.key.pem
|
||||
CERT=/data/localhost.cert.pem
|
||||
KEY=/data/localhost.key.pem
|
||||
|
||||
# If production.{cert,key}.pem exists, prefer them. This allows
|
||||
# user customization of the certificates that FastAPI uses.
|
||||
if [ -f /cache/production.cert.pem ]; then
|
||||
CERT=/cache/production.cert.pem
|
||||
if [ -f /data/production.cert.pem ]; then
|
||||
CERT=/data/production.cert.pem
|
||||
fi
|
||||
if [ -f /cache/production.key.pem ]; then
|
||||
KEY=/cache/production.key.pem
|
||||
if [ -f /data/production.key.pem ]; then
|
||||
KEY=/data/production.key.pem
|
||||
fi
|
||||
|
||||
# By default, set FASTAPI_WORKERS to 2. In production, this should
|
||||
|
|
|
@ -8,7 +8,7 @@ echo " (cgit) : https://localhost:8444/cgit/"
|
|||
echo " - PHP : https://localhost:8443/"
|
||||
echo " (cgit) : https://localhost:8443/cgit/"
|
||||
echo
|
||||
echo " Note: Copy root CA (./cache/ca.root.pem) to ca-certificates or browser."
|
||||
echo " Note: Copy root CA (./data/ca.root.pem) to ca-certificates or browser."
|
||||
echo
|
||||
echo " Thanks for using aurweb!"
|
||||
echo
|
||||
|
|
|
@ -32,10 +32,10 @@ pytest
|
|||
if [ $COVERAGE -eq 1 ]; then
|
||||
make -C test coverage
|
||||
|
||||
# /cache is mounted as a volume. Copy coverage into it.
|
||||
# /data is mounted as a volume. Copy coverage into it.
|
||||
# Users can then sanitize the coverage locally in their
|
||||
# aurweb root directory: ./util/fix-coverage ./cache/.coverage
|
||||
rm -f /cache/.coverage
|
||||
cp -v .coverage /cache/.coverage
|
||||
chmod 666 /cache/.coverage
|
||||
# aurweb root directory: ./util/fix-coverage ./data/.coverage
|
||||
rm -f /data/.coverage
|
||||
cp -v .coverage /data/.coverage
|
||||
chmod 666 /data/.coverage
|
||||
fi
|
||||
|
|
|
@ -14,12 +14,12 @@ bash $dir/run-pytests.sh --no-coverage
|
|||
|
||||
make -C test coverage
|
||||
|
||||
# /cache is mounted as a volume. Copy coverage into it.
|
||||
# /data is mounted as a volume. Copy coverage into it.
|
||||
# Users can then sanitize the coverage locally in their
|
||||
# aurweb root directory: ./util/fix-coverage ./cache/.coverage
|
||||
rm -f /cache/.coverage
|
||||
cp -v .coverage /cache/.coverage
|
||||
chmod 666 /cache/.coverage
|
||||
# aurweb root directory: ./util/fix-coverage ./data/.coverage
|
||||
rm -f /data/.coverage
|
||||
cp -v .coverage /data/.coverage
|
||||
chmod 666 /data/.coverage
|
||||
|
||||
# Run flake8 and isort checks.
|
||||
for dir in aurweb test migrations; do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue