update
This commit is contained in:
@@ -116,6 +116,13 @@ broker_config_ready() {
|
||||
return 0
|
||||
}
|
||||
|
||||
require_tls_certificate() {
|
||||
[[ -f "${SSL_CERTIFICATE_DIR}/${SSL_CERTIFICATE_FILE}" ]] ||
|
||||
fail "TLS certificate was not found at ${SSL_CERTIFICATE_DIR}/${SSL_CERTIFICATE_FILE}; run ./manage.sh bootstrap"
|
||||
[[ -f "${SSL_CERTIFICATE_DIR}/${SSL_CERTIFICATE_KEY_FILE}" ]] ||
|
||||
fail "TLS certificate key was not found at ${SSL_CERTIFICATE_DIR}/${SSL_CERTIFICATE_KEY_FILE}; run ./manage.sh bootstrap"
|
||||
}
|
||||
|
||||
require_env() {
|
||||
[[ -f .env ]] || fail "copy .env.example to .env and configure it first"
|
||||
BROKER_DOMAIN="$(read_env_setting BROKER_DOMAIN)"
|
||||
@@ -189,6 +196,7 @@ prepare() {
|
||||
config/gitea/data \
|
||||
config/gitea/config \
|
||||
config/letsencrypt \
|
||||
config/letsencrypt/archive \
|
||||
config/ssl \
|
||||
config/certbot-webroot \
|
||||
config/backups
|
||||
@@ -218,6 +226,7 @@ bootstrap)
|
||||
--email "$LETSENCRYPT_EMAIL" \
|
||||
--cert-name "$BROKER_DOMAIN" \
|
||||
-d "$BROKER_DOMAIN" -d "$GITEA_DOMAIN"
|
||||
require_tls_certificate
|
||||
compose_stack up -d gitea nginx
|
||||
else
|
||||
compose_stack up -d gitea nginx
|
||||
@@ -228,6 +237,9 @@ start)
|
||||
prepare
|
||||
broker_config_ready ||
|
||||
fail "broker configuration is incomplete; run ./manage.sh configure-broker"
|
||||
if [[ "$SSL_MODE" != "none" ]]; then
|
||||
require_tls_certificate
|
||||
fi
|
||||
compose_stack up -d --build
|
||||
;;
|
||||
start-direct)
|
||||
|
||||
Reference in New Issue
Block a user