You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**App directory**: The application is deployed to `/opt/torrust/`, **NOT** `/home/torrust/app/`. This is the working directory for docker compose commands on the VM.
caddy 80/tcp, 443/tcp, 443/udp # Entry point for HTTPS
896
907
```
897
908
898
-
### Phase 7: Schema Generation (30 minutes)
909
+
### Phase 7: CLI Command Compatibility with HTTPS (3-4 hours)
910
+
911
+
When HTTPS is enabled, the deployer commands must adapt their behavior to work with domain-based URLs instead of direct IP addresses, and handle internal ports that are no longer directly accessible.
912
+
913
+
#### 7.1: Update `test` command for HTTPS-enabled environments
914
+
915
+
**Current Problem**: The `test` command validates services by accessing them directly via IP and internal ports (e.g., `http://10.140.190.214:1212/api/health_check`). When TLS is enabled for a service:
916
+
917
+
1. The internal port (e.g., 1212) is not exposed externally - only Caddy ports (80, 443) are exposed
918
+
2. The service should be accessed via its HTTPS domain (e.g., `https://api.tracker.local`)
919
+
920
+
**Current Behavior** (fails when TLS enabled):
921
+
922
+
```text
923
+
$ cargo run -- test manual-https-test
924
+
925
+
⏳ [1/3] Validating environment...
926
+
⏳ ✓ Environment name validated: manual-https-test (took 0ms)
927
+
⏳ [2/3] Creating command handler...
928
+
⏳ ✓ Done (took 0ms)
929
+
⏳ [3/3] Testing infrastructure...
930
+
❌ Test command failed: Validation failed for environment 'manual-https-test': Remote action failed: Action 'running-services-validation' validation failed: Tracker API external health check failed: error sending request for url (http://10.140.190.214:1212/api/health_check). Check that tracker is running and firewall allows port 1212.
931
+
```
932
+
933
+
**Required Changes**:
934
+
935
+
- [ ] Detect if a service has TLS enabled from environment configuration
936
+
- [ ] For TLS-enabled services:
937
+
- [ ] Use the configured domain with HTTPS protocol instead of IP with internal port
938
+
- [ ] For local/test domains (e.g., `.local`), accept self-signed certificates from Caddy's local CA
939
+
- [ ] Show clear message: "Testing via HTTPS endpoint: https://api.tracker.local"
940
+
- [ ] For non-TLS services:
941
+
- [ ] Continue using direct IP and port access as before
942
+
- [ ] Update error messages to clarify the HTTPS testing behavior
943
+
944
+
**Expected Behavior After Fix**:
945
+
946
+
```text
947
+
Testing Tracker API via HTTPS: https://api.tracker.local/api/health_check ✅
#### 7.2: Update `show` command for HTTPS-enabled environments
952
+
953
+
**Current Problem**: The `show` command displays service endpoints using only IP addresses and internal ports, which are misleading when HTTPS is enabled:
954
+
955
+
1. Displayed URLs may not work (internal ports not exposed)
956
+
2. Users don't know the correct HTTPS URLs to use
957
+
3. No indication that domain-based access is required
958
+
959
+
**Current Behavior** (shows incorrect URLs when TLS enabled):
0 commit comments