feat(install_site): handle multiple URL for certs
This commit is contained in:
parent
b640f953b2
commit
d49c066585
@ -4,6 +4,7 @@ services:
|
|||||||
build: install_site
|
build: install_site
|
||||||
environment:
|
environment:
|
||||||
- BASE_URL=subdomain.domain.tld
|
- BASE_URL=subdomain.domain.tld
|
||||||
|
- OTHER_URLS=subdomain1.domain.tld subdomain2.domain.tld
|
||||||
- EMAIL=user@domain.tld
|
- EMAIL=user@domain.tld
|
||||||
volumes:
|
volumes:
|
||||||
- ./app_nginx.conf:/web/app.conf
|
- ./app_nginx.conf:/web/app.conf
|
||||||
@ -19,4 +20,3 @@ volumes:
|
|||||||
external: true
|
external: true
|
||||||
certbotroot:
|
certbotroot:
|
||||||
external: true
|
external: true
|
||||||
config:
|
|
||||||
|
@ -1,12 +1,20 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
certbot certonly -n \
|
CERTBOTCMD=(
|
||||||
--webroot \
|
certbot certonly -n
|
||||||
-w /var/www/certbot/ \
|
--webroot
|
||||||
--agree-tos \
|
-w /var/www/certbot/
|
||||||
--no-eff-email \
|
--agree-tos
|
||||||
-m "$EMAIL" \
|
--no-eff-email
|
||||||
|
-m "$EMAIL"
|
||||||
-d "$BASE_URL"
|
-d "$BASE_URL"
|
||||||
|
)
|
||||||
|
|
||||||
|
for URL in $OTHER_URLS; do
|
||||||
|
CERTBOTCMD+=(-d "$URL")
|
||||||
|
done
|
||||||
|
|
||||||
|
"${CERTBOTCMD[@]}"
|
||||||
|
|
||||||
for f in *; do
|
for f in *; do
|
||||||
envsubst "$(env | xargs printf '$%s ')" < "$f" > "/sites/$f"
|
envsubst "$(env | xargs printf '$%s ')" < "$f" > "/sites/$f"
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
---
|
---
|
||||||
services:
|
services:
|
||||||
matrix_install_site:
|
install_site:
|
||||||
build: install_site
|
build: install_site
|
||||||
environment:
|
environment:
|
||||||
- BASE_URL=$MATRIX_BASE_URL
|
- BASE_URL=$MATRIX_BASE_URL
|
||||||
|
- OTHER_URLS=$COTURN_BASE_URL
|
||||||
- EMAIL
|
- EMAIL
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf:/web/matrix.conf
|
- ./nginx.conf:/web/matrix.conf
|
||||||
@ -12,15 +13,6 @@ services:
|
|||||||
- certbotroot:/var/www/certbot/
|
- certbotroot:/var/www/certbot/
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /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:
|
db:
|
||||||
image: docker.io/postgres:15
|
image: docker.io/postgres:15
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
5
todo
5
todo
@ -1,7 +1,6 @@
|
|||||||
openvpn auto download config from mullvad?
|
mullvad config api download
|
||||||
https://docs.gitea.com/installation/install-with-docker#ssh-container-passthrough
|
|
||||||
docs
|
docs
|
||||||
matrix auto init postgres config
|
matrix key server not matrix.org
|
||||||
|
|
||||||
- modoboa
|
- modoboa
|
||||||
- collabora
|
- collabora
|
||||||
|
Loading…
Reference in New Issue
Block a user