@@ -278,7 +278,8 @@ Based on current implementation status, these areas need extension or still requ
278
278
279
279
2 . ** Environment Configuration** : (one-time, deployment-specific)
280
280
281
- - ❌ ** Cannot automate** : Configure ` DOMAIN_NAME ` and ` CERTBOT_EMAIL ` (deployment-specific values)
281
+ - ❌ ** Cannot automate** : Configure ` TRACKER_DOMAIN ` , ` GRAFANA_DOMAIN ` and ` CERTBOT_EMAIL `
282
+ (deployment-specific values)
282
283
- ⏱️ ** Time required** : ~ 2 minutes
283
284
- 📋 ** Guidance** : Template with clear placeholders and validation
284
285
@@ -467,8 +468,9 @@ Variables already added:
467
468
468
469
``` bash
469
470
# === SSL CERTIFICATE CONFIGURATION ===
470
- # Domain name for SSL certificates (required for production)
471
- DOMAIN_NAME=REPLACE_WITH_YOUR_DOMAIN
471
+ # Domain names for SSL certificates (required for production)
472
+ TRACKER_DOMAIN=REPLACE_WITH_YOUR_TRACKER_DOMAIN
473
+ GRAFANA_DOMAIN=REPLACE_WITH_YOUR_GRAFANA_DOMAIN
472
474
# Email for Let's Encrypt certificate registration (required for production)
473
475
CERTBOT_EMAIL=REPLACE_WITH_YOUR_EMAIL
474
476
# Enable SSL certificates (true for production, false for testing)
@@ -487,8 +489,9 @@ Variables already added:
487
489
488
490
``` bash
489
491
# === SSL CERTIFICATE CONFIGURATION ===
490
- # Domain name for SSL certificates (local testing with fake domains)
491
- DOMAIN_NAME=test.local
492
+ # Domain names for SSL certificates (local testing with fake domains)
493
+ TRACKER_DOMAIN=tracker.test.local
494
+ GRAFANA_DOMAIN=grafana.test.local
492
495
# Email for certificate registration (test email for local)
493
496
CERTBOT_EMAIL=test@test.local
494
497
# Enable SSL certificates (true for production, false for testing)
@@ -532,7 +535,7 @@ validate_environment() {
532
535
533
536
** REQUIRED** : Extend this function to validate SSL variables:
534
537
535
- - ` DOMAIN_NAME ` (should not be placeholder value )
538
+ - ` TRACKER_DOMAIN ` and ` GRAFANA_DOMAIN ` (should not be placeholder values )
536
539
- ` CERTBOT_EMAIL ` (should not be placeholder value)
537
540
- ` ENABLE_SSL ` (should be true/false)
538
541
- ` ENABLE_DB_BACKUPS ` (should be true/false)
@@ -699,7 +702,8 @@ The recommended workflow follows the [Torrust production deployment guide](https
699
702
``` bash
700
703
# Step 1: Deploy with HTTP-only nginx configuration
701
704
cp ../infrastructure/config/templates/application/nginx/nginx-http.conf.tpl /var/lib/torrust/proxy/etc/nginx-conf/default.conf
702
- sed -i " s/\$ {DOMAIN_NAME}/torrust-demo.com/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
705
+ sed -i " s/\$ {TRACKER_DOMAIN}/tracker.torrust-demo.com/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
706
+ sed -i " s/\$ {GRAFANA_DOMAIN}/grafana.torrust-demo.com/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
703
707
docker compose up -d
704
708
```
705
709
@@ -745,7 +749,8 @@ docker compose -f compose.test.yaml up -d pebble pebble-challtestsrv
745
749
746
750
# Step 2: Set up test nginx configuration
747
751
cp ../infrastructure/config/templates/application/nginx/nginx-http.conf.tpl /var/lib/torrust/proxy/etc/nginx-conf/default.conf
748
- sed -i " s/\$ {DOMAIN_NAME}/test.local/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
752
+ sed -i " s/\$ {TRACKER_DOMAIN}/tracker.test.local/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
753
+ sed -i " s/\$ {GRAFANA_DOMAIN}/grafana.test.local/g" /var/lib/torrust/proxy/etc/nginx-conf/default.conf
749
754
750
755
# Step 3: Start application services
751
756
docker compose -f compose.test.yaml up -d
@@ -1165,7 +1170,8 @@ twelve-factor deployment scripts.
1165
1170
` ` ` bash
1166
1171
# Add these new variables to existing template
1167
1172
# === SSL CERTIFICATE CONFIGURATION ===
1168
- DOMAIN_NAME=REPLACE_WITH_YOUR_DOMAIN
1173
+ TRACKER_DOMAIN=REPLACE_WITH_YOUR_TRACKER_DOMAIN
1174
+ GRAFANA_DOMAIN=REPLACE_WITH_YOUR_GRAFANA_DOMAIN
1169
1175
CERTBOT_EMAIL=REPLACE_WITH_YOUR_EMAIL
1170
1176
ENABLE_SSL=true
1171
1177
@@ -1179,7 +1185,8 @@ BACKUP_RETENTION_DAYS=7
1179
1185
` ` ` bash
1180
1186
# Add these new variables to existing template
1181
1187
# === SSL CERTIFICATE CONFIGURATION ===
1182
- DOMAIN_NAME=test.local
1188
+ TRACKER_DOMAIN=tracker.test.local
1189
+ GRAFANA_DOMAIN=grafana.test.local
1183
1190
CERTBOT_EMAIL=test@test.local
1184
1191
ENABLE_SSL=false
1185
1192
@@ -1218,15 +1225,15 @@ setup_ssl_automation() {
1218
1225
log_info "Setting up SSL certificates (Let's Encrypt)..."
1219
1226
1220
1227
# Validate environment variables
1221
- if [[ -z "${DOMAIN_NAME :-}" || -z "${CERTBOT_EMAIL:-}" ]]; then
1222
- log_error "SSL requires DOMAIN_NAME and CERTBOT_EMAIL in environment config"
1228
+ if [[ -z "${TRACKER_DOMAIN:-}" || -z "${GRAFANA_DOMAIN :-}" || -z "${CERTBOT_EMAIL:-}" ]]; then
1229
+ log_error "SSL requires TRACKER_DOMAIN, GRAFANA_DOMAIN and CERTBOT_EMAIL in environment config"
1223
1230
exit 1
1224
1231
fi
1225
1232
1226
1233
# DNS validation and certificate generation
1227
1234
vm_exec "${vm_ip}" "
1228
1235
cd /home/torrust/github/torrust/torrust-tracker-demo/application
1229
- ./share/bin/ssl_setup.sh '${DOMAIN_NAME }' '${CERTBOT_EMAIL}'
1236
+ ./share/bin/ssl_setup.sh '${TRACKER_DOMAIN}' '${GRAFANA_DOMAIN }' '${CERTBOT_EMAIL}'
1230
1237
" "SSL certificate setup"
1231
1238
1232
1239
# Add SSL renewal crontab using template
@@ -1461,7 +1468,7 @@ This approach ensures **backward compatibility** while adding new automation fea
1461
1468
**Manual Steps That Will Still Be Required**:
1462
1469
1463
1470
- **DNS Configuration**: Point domain A records to server IP (one-time setup)
1464
- - **Environment Variables**: Configure `DOMAIN_NAME ` and `CERTBOT_EMAIL` in production.env
1471
+ - **Environment Variables**: Configure `TRACKER_DOMAIN`, `GRAFANA_DOMAIN ` and `CERTBOT_EMAIL` in production.env
1465
1472
(one-time setup)
1466
1473
- **SSL Certificate Generation**: Run guided SSL setup script after DNS configuration (one-time setup)
1467
1474
- **Grafana Initial Setup**: Configure dashboards and data sources (optional, post-deployment)
@@ -1586,7 +1593,7 @@ optionally enable HTTPS functionality using the standalone SSL setup scripts.
1586
1593
- ` grafana.yourdomain.com` → Server IP
1587
1594
1588
1595
3. **Environment Configuration** :
1589
- - ` DOMAIN_NAME ` set to your actual domain in `.env`
1596
+ - ` TRACKER_DOMAIN ` and `GRAFANA_DOMAIN` set to your actual domains in `.env`
1590
1597
- ` CERTBOT_EMAIL` set to your email address
1591
1598
1592
1599
# ## SSL Setup Workflow
0 commit comments