From 2fa0fa324a995ab5ddbb8d500df0c61b9e5cc685 Mon Sep 17 00:00:00 2001 From: Cassowary Rusnov Date: Wed, 26 Oct 2022 17:57:00 -0700 Subject: [PATCH] Rejigger subdirectory hosting --- .env.sample | 7 ++----- compose.git-pull.yml | 3 +-- compose.yml | 13 +++++++++++-- thttpd.conf | 8 ++++++++ 4 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 thttpd.conf diff --git a/.env.sample b/.env.sample index 35f25dc..ffd2c20 100644 --- a/.env.sample +++ b/.env.sample @@ -1,10 +1,8 @@ TYPE=custom-html-tiny -DOMAIN=custom-html.example.com -## Domain aliases -#EXTRA_DOMAINS=', `www.custom-html.example.com`' +DOMAIN={{ .Domain }} LETS_ENCRYPT_ENV=production - +HTTP_SUBDIR= COMPOSE_FILE="compose.yml" # Single Sign On via Traefik "file provider" @@ -14,4 +12,3 @@ COMPOSE_FILE="compose.yml" #COMPOSE_FILE="$COMPOSE_FILE:compose.git-pull.yml" #GIT_REPO_URL="https://git.coopcloud.tech/dalmationer/hexbomb.gay" #CRON_SCHEDULE="*/1 * * * *" -#GIT_REPO_SUBDIR="" diff --git a/compose.git-pull.yml b/compose.git-pull.yml index 9e30a92..4871891 100644 --- a/compose.git-pull.yml +++ b/compose.git-pull.yml @@ -3,11 +3,10 @@ services: git: environment: - GIT_REPO_URL - - GIT_REPO_SUBDIR image: alpine/git:v2.32.0 entrypoint: /docker-entrypoint.sh volumes: - - content:/git/${GIT_REPO_SUBDIR} + - content:/git configs: - source: entrypoint_conf target: /docker-entrypoint.sh diff --git a/compose.yml b/compose.yml index 6598db3..cfb2466 100644 --- a/compose.yml +++ b/compose.yml @@ -20,10 +20,13 @@ services: - "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true" - "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}" - "coop-cloud.${STACK_NAME}.version=1.2.1+1.21.6" - #environment: + environment: + - HTTP_SUBDIR volumes: - content:/var/www/http - #configs: + configs: + - source: thttpd.conf + target: /etc/thttpd.conf #healthcheck: # test: ["CMD", "curl", "-f", "http://localhost"] # interval: 30s @@ -37,3 +40,9 @@ volumes: networks: proxy: external: true + +configs: + thttpd_conf: + name: ${STACK_NAME}_thttpd_conf_${THTTPD_DEFAULT_CONF_VERSION} + file: thttpd.conf + diff --git a/thttpd.conf b/thttpd.conf new file mode 100644 index 0000000..d0cf82b --- /dev/null +++ b/thttpd.conf @@ -0,0 +1,8 @@ +dir=/var/www/http/{{env "HTTP_SUBDIR"}} +vhost +chroot +user=thttpd +cgipat=**.cgi +logfile=/var/log/thttpd/thttpd.log +pidfile=/var/run/thttpd.pid +charset=utf-8