diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-12-10 14:54:12 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-12-10 17:03:41 +0100 |
commit | e28d864254b5eb1be2d9afe62a04ca616efed12e (patch) | |
tree | 4288731f6e830c2bdb68da7e81fb2fd8f029375f | |
parent | cb5ea9275ad2f25b78c6fc99ab75f3626ee752b9 (diff) | |
download | koszko-org-server-e28d864254b5eb1be2d9afe62a04ca616efed12e.tar.gz koszko-org-server-e28d864254b5eb1be2d9afe62a04ca616efed12e.zip |
make hydrillarepos.koszko.org virtualhost testable
-rw-r--r-- | Makefile | 17 | ||||
-rwxr-xr-x | guix-container.sh | 6 | ||||
-rw-r--r-- | hosts-extra | 2 |
3 files changed, 14 insertions, 11 deletions
@@ -67,21 +67,22 @@ 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 prepare-test-root: sample-malcontent rm -rf $(TEST_ROOT_DIR) @# Prepare replacement `/var/www` - for SITE in koszko.org hydrillarepos.koszko.org; do \ - mkdir -p $(TEST_ROOT_DIR)/var/www/"$$SITE"/html; \ - printf 'This is dummy file for %s :D\n' "$$SITE" \ - > $(TEST_ROOT_DIR)/var/www/"$$SITE"/html/index.html; \ + for WWW_SUBDIR in \ + koszko.org/html \ + hydrillarepos.koszko.org/html \ + hydrilla.koszko.org/html/downloads \ + hydrillarepos.koszko.org/html \ + ; do \ + mkdir -p $(TEST_ROOT_DIR)/var/www/"$$WWW_SUBDIR"; \ + printf 'This is dummy file for %s :D\n' "$$WWW_SUBDIR" \ + > $(TEST_ROOT_DIR)/var/www/"$$WWW_SUBDIR"/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/guix-container.sh b/guix-container.sh index 1b6ed45..4134c29 100755 --- a/guix-container.sh +++ b/guix-container.sh @@ -83,27 +83,27 @@ start() { KOSZKO_SIDELOAD_REAL="$HOST_SYSTEM_ROOT"/var/www/koszko.org/html HYDRILLA_HTTP_REAL="$HOST_SYSTEM_ROOT"/var/www/hydrilla.koszko.org/html + HYDRILLAREPOS_HTTP_REAL="$HOST_SYSTEM_ROOT"/var/www/hydrillarepos.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 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 + HYDRILLAREPOS_HTTP_DIR_SHARE_OPT=--share="$HYDRILLAREPOS_HTTP_REAL"=/srv/http/hydrillarepos.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 - REPOS_SHARE_OPT=--share="$REPOS_REAL"=/srv/http/hydrillarepos.koszko.org mkdir --mode=700 -p "$LOG_DIR" mkdir --mode=700 -p "$LOG_DIR"/container "$EXECUTABLE" "$KOSZKO_SIDELOAD_DIR_SHARE_OPT" \ "$HYDRILLA_HTTP_DIR_SHARE_OPT" \ + "$HYDRILLAREPOS_HTTP_DIR_SHARE_OPT" \ "$LOG_DIR_SHARE_OPT" \ "$ETC_DIR_SHARE_OPT" \ "$VAR_HYDRILLA_DIR_SHARE_OPT" \ - "$REPOS_SHARE_OPT" \ >> "$LOG_DIR"/stdout.log 2>> "$LOG_DIR"/stderr.log & GUILE_PID=$! diff --git a/hosts-extra b/hosts-extra index 3f8cd63..d15d1e4 100644 --- a/hosts-extra +++ b/hosts-extra @@ -20,3 +20,5 @@ 10.207.87.2 www.haketilo.koszko.org 10.207.87.2 hydrilla.koszko.org 10.207.87.2 www.hydrilla.koszko.org +10.207.87.2 hydrillarepos.koszko.org +10.207.87.2 www.hydrillarepos.koszko.org |