mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(docker): fix cgit clone-prefix
Additionally, clone-prefix is now configurable via environment variables: - CGIT_CLONE_PREFIX_PHP - CGIT_CLONE_PREFIX_FASTAPI These vars can be used by production to customize the clone prefix. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
c4163547f6
commit
db730ad8cb
3 changed files with 7 additions and 3 deletions
2
.env
2
.env
|
@ -1,3 +1,5 @@
|
|||
FASTAPI_BACKEND="uvicorn"
|
||||
FASTAPI_WORKERS=2
|
||||
MARIADB_SOCKET_DIR="/var/run/mysqld/"
|
||||
CGIT_CLONE_PREFIX_PHP=https://localhost:8443
|
||||
CGIT_CLONE_PREFIX_FASTAPI=https://localhost:8444
|
||||
|
|
|
@ -88,8 +88,9 @@ services:
|
|||
init: true
|
||||
environment:
|
||||
- AUR_CONFIG=/aurweb/conf/config
|
||||
- CGIT_CLONE_PREFIX=$CGIT_CLONE_PREFIX_PHP
|
||||
entrypoint: /docker/cgit-entrypoint.sh
|
||||
command: /docker/scripts/run-cgit.sh 3000 "https://localhost:8443/cgit"
|
||||
command: /docker/scripts/run-cgit.sh 3000
|
||||
healthcheck:
|
||||
test: "bash /docker/health/cgit.sh 3000"
|
||||
depends_on:
|
||||
|
@ -103,8 +104,9 @@ services:
|
|||
init: true
|
||||
environment:
|
||||
- AUR_CONFIG=/aurweb/conf/config
|
||||
- CGIT_CLONE_PREFIX=$CGIT_CLONE_PREFIX_FASTAPI
|
||||
entrypoint: /docker/cgit-entrypoint.sh
|
||||
command: /docker/scripts/run-cgit.sh 3000 "https://localhost:8444/cgit"
|
||||
command: /docker/scripts/run-cgit.sh 3000
|
||||
healthcheck:
|
||||
test: "bash /docker/health/cgit.sh 3000"
|
||||
depends_on:
|
||||
|
|
|
@ -4,7 +4,7 @@ set -eou pipefail
|
|||
mkdir -p /var/cache/cgit
|
||||
|
||||
cp -vf conf/cgitrc.proto /etc/cgitrc
|
||||
sed -ri "s|clone-prefix=.*|clone-prefix=${2}|" /etc/cgitrc
|
||||
sed -ri "s|clone-prefix=.*|clone-prefix=${CGIT_CLONE_PREFIX}|" /etc/cgitrc
|
||||
sed -ri 's|header=.*|header=/aurweb/web/template/cgit/header.html|' /etc/cgitrc
|
||||
sed -ri 's|footer=.*|footer=/aurweb/web/template/cgit/footer.html|' /etc/cgitrc
|
||||
sed -ri 's|repo\.path=.*|repo.path=/aurweb/aur.git|' /etc/cgitrc
|
||||
|
|
Loading…
Add table
Reference in a new issue