Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 331ba20

Browse files
committed
fix: [#21] resolve deployment script issues found during e2e testing
- Fix ENABLE_HTTPS variable to use ENABLE_SSL from environment configuration - Correct shell-utils.sh path from application/share/dev/ to scripts/ - Add SSH options to rsync to avoid host key verification issues in testing These fixes resolve deployment failures discovered during comprehensive end-to-end testing of the architectural changes. The e2e test now passes successfully, validating the complete twelve-factor deployment workflow.
1 parent cb6815b commit 331ba20

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

infrastructure/scripts/deploy-app.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ TERRAFORM_DIR="${PROJECT_ROOT}/infrastructure/terraform"
1414
ENVIRONMENT="${1:-local}"
1515
VM_IP="${2:-}"
1616
SKIP_HEALTH_CHECK="${SKIP_HEALTH_CHECK:-false}"
17-
ENABLE_HTTPS="${ENABLE_HTTPS:-true}" # Enable HTTPS with self-signed certificates by default
17+
ENABLE_HTTPS="${ENABLE_SSL:-false}" # Enable HTTPS with self-signed certificates by default
1818

1919
# Source shared shell utilities
2020
# shellcheck source=../../scripts/shell-utils.sh
@@ -408,7 +408,7 @@ generate_selfsigned_certificates() {
408408

409409
# Copy the certificate generation script to VM
410410
local cert_script="${PROJECT_ROOT}/application/share/bin/ssl-generate-test-certs.sh"
411-
local shell_utils="${PROJECT_ROOT}/application/share/dev/shell-utils.sh"
411+
local shell_utils="${PROJECT_ROOT}/scripts/shell-utils.sh"
412412

413413
if [[ ! -f "${cert_script}" ]]; then
414414
log_error "Certificate generation script not found: ${cert_script}"
@@ -470,7 +470,10 @@ deploy_local_working_tree() {
470470

471471
# Use rsync with --filter to respect .gitignore while including untracked files
472472
# This copies all files in working tree except those explicitly ignored by git
473-
if ! rsync -avz --filter=':- .gitignore' --exclude='.git/' ./ "torrust@${vm_ip}:/home/torrust/github/torrust/torrust-tracker-demo/"; then
473+
# Use SSH options to avoid host key verification issues in testing
474+
if ! rsync -avz --filter=':- .gitignore' --exclude='.git/' \
475+
-e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" \
476+
./ "torrust@${vm_ip}:/home/torrust/github/torrust/torrust-tracker-demo/"; then
474477
log_error "Failed to rsync working tree to VM"
475478
exit 1
476479
fi

0 commit comments

Comments
 (0)