aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--container.scm4
-rwxr-xr-xguix-container.sh7
3 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6f1a149..6ae7ab6 100644
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,7 @@ sample-malcontent:
"$$(realpath $@)" | \
make -C subrepos/hydrilla shell-with-haketilo
+HYDRILLA_HTTP_ROOT_DIR = $(TEST_ROOT_DIR)/var/www/hydrilla.koszko.org/html
HYDRILLA_WEBSITE_ETC_DIR = $(TEST_ROOT_DIR)/etc/guix-container/hydrilla-website
MALCONTENT_DIR = $(TEST_ROOT_DIR)/var/lib/hydrilla/malcontent_dirs
@@ -78,6 +79,9 @@ prepare-test-root: sample-malcontent
printf 'This is dummy file for %s :D\n' "$$SITE" \
> $(TEST_ROOT_DIR)/var/www/"$$SITE"/html/index.html; \
done
+ mkdir -p $(HYDRILLA_HTTP_ROOT_DIR)/downloads
+ printf 'This is dummy file for hydrilla.koszko.org/downloads\n' \
+ > $(HYDRILLA_HTTP_ROOT_DIR)/downloads/index.html
@# Prepare replacement `/var/log`
mkdir -p $(TEST_ROOT_DIR)/var/log
@# Prepare replacement `/etc`
diff --git a/container.scm b/container.scm
index e6b3278..af37846 100644
--- a/container.scm
+++ b/container.scm
@@ -179,6 +179,10 @@
,(koszko-httpd-redirect-if-other-host "hydrilla.koszko.org")
,(httpd-directive
+ 'Alias "/downloads"
+ "/srv/http/hydrilla.koszko.org/downloads")
+
+ ,(httpd-directive
'Alias "/schemas"
(g-package-file hydrilla-json-schemas "/share/hydrilla-json-schemas"))
diff --git a/guix-container.sh b/guix-container.sh
index 42ba006..1b6ed45 100755
--- a/guix-container.sh
+++ b/guix-container.sh
@@ -82,12 +82,14 @@ start() {
LOG_DIR="$HOST_SYSTEM_ROOT"/var/log/guix-container
KOSZKO_SIDELOAD_REAL="$HOST_SYSTEM_ROOT"/var/www/koszko.org/html
+ HYDRILLA_HTTP_REAL="$HOST_SYSTEM_ROOT"/var/www/hydrilla.koszko.org/html
LOG_REAL="$LOG_DIR"/container
ETC_REAL="$HOST_SYSTEM_ROOT"/etc/guix-container
VAR_HYDRILLA_REAL="$HOST_SYSTEM_ROOT"/var/lib/hydrilla
REPOS_REAL="$HOST_SYSTEM_ROOT"/var/www/hydrillarepos.koszko.org/html
- HTTP_DIR_SHARE_OPT=--share="$KOSZKO_SIDELOAD_REAL"=/srv/http/koszko.org
+ KOSZKO_SIDELOAD_DIR_SHARE_OPT=--share="$KOSZKO_SIDELOAD_REAL"=/srv/http/koszko.org
+ HYDRILLA_HTTP_DIR_SHARE_OPT=--share="$HYDRILLA_HTTP_REAL"=/srv/http/hydrilla.koszko.org
LOG_DIR_SHARE_OPT=--share="$LOG_REAL"=/var/log
ETC_DIR_SHARE_OPT=--share="$ETC_REAL"=/etc
VAR_HYDRILLA_DIR_SHARE_OPT=--share="$VAR_HYDRILLA_REAL"=/var/lib/hydrilla
@@ -96,7 +98,8 @@ start() {
mkdir --mode=700 -p "$LOG_DIR"
mkdir --mode=700 -p "$LOG_DIR"/container
- "$EXECUTABLE" "$HTTP_DIR_SHARE_OPT" \
+ "$EXECUTABLE" "$KOSZKO_SIDELOAD_DIR_SHARE_OPT" \
+ "$HYDRILLA_HTTP_DIR_SHARE_OPT" \
"$LOG_DIR_SHARE_OPT" \
"$ETC_DIR_SHARE_OPT" \
"$VAR_HYDRILLA_DIR_SHARE_OPT" \