mirror of
https://github.com/aykhans/my-self-host-services.git
synced 2026-05-29 15:35:59 +00:00
update stalwart-bootstrap
This commit is contained in:
@@ -210,10 +210,15 @@ start_services() {
|
||||
|
||||
echo "Starting stalwart..."
|
||||
$DOCKER_COMPOSE_COMMAND -f ./stalwart/docker-compose.yaml up --pull always -d
|
||||
if [ $? -ne 0 ]; then
|
||||
print_error "failed to start Stalwart!"
|
||||
exit 1
|
||||
fi
|
||||
$DOCKER_COMPOSE_COMMAND -f ./stalwart/docker-compose.yaml run --rm --pull always stalwart-bootstrap
|
||||
if [ $? -eq 0 ]; then
|
||||
print_success "Stalwart started successfully."
|
||||
else
|
||||
print_error "failed to start Stalwart!"
|
||||
print_error "Stalwart bootstrap failed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ services:
|
||||
max-file: "3"
|
||||
|
||||
stalwart-bootstrap:
|
||||
profiles: [bootstrap]
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.bootstrap
|
||||
@@ -71,7 +72,10 @@ services:
|
||||
# 3) Idempotent SystemSettings update (singleton)
|
||||
stalwart-cli update SystemSettings --field "defaultHostname=$$STALWART_DEFAULT_HOSTNAME" --field "defaultDomainId=$$DOMAIN_ID"
|
||||
|
||||
# 4) Trigger settings reload so url_https recomputes (no restart needed)
|
||||
# 4) Trust X-Forwarded-* headers from Caddy (real client IP for security/rate-limit)
|
||||
stalwart-cli update Http --field useXForwarded=true
|
||||
|
||||
# 5) Trigger settings reload so url_https recomputes (no restart needed)
|
||||
stalwart-cli create Action/ReloadSettings --json "{}"
|
||||
|
||||
echo "Bootstrap complete"
|
||||
|
||||
Reference in New Issue
Block a user