diff --git a/_nginx/install_site/compose.yaml b/_nginx/install_site/compose.yaml index c53d24b..93f4671 100644 --- a/_nginx/install_site/compose.yaml +++ b/_nginx/install_site/compose.yaml @@ -4,6 +4,7 @@ services: build: install_site environment: - BASE_URL=subdomain.domain.tld + - OTHER_URLS=subdomain1.domain.tld subdomain2.domain.tld - EMAIL=user@domain.tld volumes: - ./app_nginx.conf:/web/app.conf @@ -19,4 +20,3 @@ volumes: external: true certbotroot: external: true - config: diff --git a/_nginx/install_site/entrypoint.sh b/_nginx/install_site/entrypoint.sh index ddee1f4..0a58ed8 100755 --- a/_nginx/install_site/entrypoint.sh +++ b/_nginx/install_site/entrypoint.sh @@ -1,12 +1,20 @@ -#!/bin/sh -e +#!/bin/bash -e -certbot certonly -n \ - --webroot \ - -w /var/www/certbot/ \ - --agree-tos \ - --no-eff-email \ - -m "$EMAIL" \ +CERTBOTCMD=( + certbot certonly -n + --webroot + -w /var/www/certbot/ + --agree-tos + --no-eff-email + -m "$EMAIL" -d "$BASE_URL" +) + +for URL in $OTHER_URLS; do + CERTBOTCMD+=(-d "$URL") +done + +"${CERTBOTCMD[@]}" for f in *; do envsubst "$(env | xargs printf '$%s ')" < "$f" > "/sites/$f" diff --git a/matrix/compose.yaml b/matrix/compose.yaml index 33d0f6e..5a48764 100644 --- a/matrix/compose.yaml +++ b/matrix/compose.yaml @@ -1,9 +1,10 @@ --- services: - matrix_install_site: + install_site: build: install_site environment: - BASE_URL=$MATRIX_BASE_URL + - OTHER_URLS=$COTURN_BASE_URL - EMAIL volumes: - ./nginx.conf:/web/matrix.conf @@ -12,15 +13,6 @@ services: - certbotroot:/var/www/certbot/ - /var/run/docker.sock:/var/run/docker.sock - coturn_install_site: - build: install_site - environment: - - BASE_URL=$COTURN_BASE_URL - - EMAIL - volumes: - - certs:/etc/letsencrypt/ - - certbotroot:/var/www/certbot/ - db: image: docker.io/postgres:15 restart: unless-stopped diff --git a/todo b/todo index ef076b3..6661ed3 100644 --- a/todo +++ b/todo @@ -1,7 +1,6 @@ -openvpn auto download config from mullvad? -https://docs.gitea.com/installation/install-with-docker#ssh-container-passthrough +mullvad config api download docs -matrix auto init postgres config +matrix key server not matrix.org - modoboa - collabora