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

Commit ab2e551

Browse files
committed
cleanup: remove obsolete deployment and installation scripts
Remove legacy scripts replaced by twelve-factor deployment workflow: - application/share/bin/deploy-torrust-tracker-demo.com.sh - application/share/bin/install.sh These scripts have been superseded by the new infrastructure-based deployment process: - Configuration generation: infrastructure/scripts/configure-env.sh - Deployment automation: infrastructure/scripts/deploy-app.sh - Twelve-factor workflow: make infra-apply + make app-deploy Also updated: - application/README.md: Remove references to deleted scripts - application/docs/deployment.md: Document new deployment workflow - application/tests/test-unit-application.sh: Test remaining utility scripts Benefits: - Reduces maintenance burden - Eliminates duplicate/conflicting deployment methods - Simplifies codebase to focus on modern twelve-factor approach - Removes potential confusion between legacy and new workflows
1 parent d3e9ed5 commit ab2e551

File tree

5 files changed

+41
-118
lines changed

5 files changed

+41
-118
lines changed

application/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ application/
1919
│ ├── torrust-tracker-grafana-dashboard.png
2020
│ └── do-firewall-configuration.png
2121
├── share/ # Application resources
22-
│ ├── bin/ # Deployment and utility scripts
23-
│ │ ├── deploy-torrust-tracker-demo.com.sh
24-
│ │ ├── install.sh
22+
│ ├── bin/ # Utility scripts
2523
│ │ ├── ssl_renew.sh
2624
│ │ ├── time-running.sh
2725
│ │ ├── tracker-db-backup.sh

application/docs/deployment.md

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,32 @@ This document outlines the deployment process for the Torrust Tracker demo appli
1010

1111
## 2. Deployment Steps
1212

13+
The Torrust Tracker Demo now uses a **twelve-factor app deployment workflow**
14+
that separates infrastructure provisioning from application deployment.
15+
16+
### From Local Machine (Recommended)
17+
18+
Use the automated deployment workflow from your local development machine:
19+
20+
```bash
21+
# Deploy infrastructure and application (complete workflow)
22+
make infra-apply ENVIRONMENT=production
23+
make app-deploy ENVIRONMENT=production
24+
25+
# Validate deployment
26+
make app-health-check ENVIRONMENT=production
27+
```
28+
29+
### Manual Deployment on Server (Legacy)
30+
31+
If you need to manually deploy on the server:
32+
1333
1. **SSH into the server**.
1434

1535
2. **Navigate to the application directory**:
1636

1737
```bash
18-
cd /home/torrust/github/torrust/torrust-tracker-demo
38+
cd /home/torrust/github/torrust/torrust-tracker-demo/application
1939
```
2040

2141
3. **Pull the latest changes** from the repository:
@@ -24,18 +44,15 @@ This document outlines the deployment process for the Torrust Tracker demo appli
2444
git pull
2545
```
2646

27-
4. **Run the deployment script**:
47+
4. **Deploy using Docker Compose**:
2848

2949
```bash
30-
./share/bin/deploy-torrust-tracker-demo.com.sh
50+
# Use the persistent volume environment file
51+
docker compose --env-file /var/lib/torrust/compose/.env pull
52+
docker compose --env-file /var/lib/torrust/compose/.env down
53+
docker compose --env-file /var/lib/torrust/compose/.env up -d
3154
```
3255

33-
This script handles:
34-
35-
- Stopping services
36-
- Rebuilding containers
37-
- Starting services
38-
3956
## 3. Verification and Smoke Testing
4057

4158
After deployment, verify that all services are running correctly.
@@ -45,7 +62,12 @@ After deployment, verify that all services are running correctly.
4562
Check the status of all Docker containers:
4663

4764
```bash
48-
docker compose ps
65+
# From local machine
66+
make app-health-check ENVIRONMENT=production
67+
68+
# Or manually on server
69+
cd /home/torrust/github/torrust/torrust-tracker-demo/application
70+
docker compose --env-file /var/lib/torrust/compose/.env ps
4971
```
5072

5173
### Application Logs

application/share/bin/deploy-torrust-tracker-demo.com.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

application/share/bin/install.sh

Lines changed: 0 additions & 90 deletions
This file was deleted.

application/tests/test-unit-application.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,25 +149,27 @@ test_deployment_scripts() {
149149
return 0
150150
fi
151151

152-
# Check for key deployment scripts
152+
# Check for key utility scripts
153153
local key_scripts=(
154-
"deploy-torrust-tracker-demo.com.sh"
154+
"ssl_renew.sh"
155+
"tracker-db-backup.sh"
156+
"tracker-filtered-logs.sh"
155157
)
156158

157159
for script in "${key_scripts[@]}"; do
158160
local script_path="${scripts_dir}/${script}"
159161
if [[ -f "${script_path}" ]]; then
160162
if [[ -x "${script_path}" ]]; then
161-
log_info "Found executable deployment script: ${script}"
163+
log_info "Found executable utility script: ${script}"
162164
else
163-
log_warning "Deployment script exists but is not executable: ${script}"
165+
log_warning "Utility script exists but is not executable: ${script}"
164166
fi
165167
else
166-
log_warning "Deployment script not found: ${script}"
168+
log_warning "Utility script not found: ${script}"
167169
fi
168170
done
169171

170-
log_success "Deployment scripts validation completed"
172+
log_success "Utility scripts validation completed"
171173
return ${failed}
172174
}
173175

0 commit comments

Comments
 (0)