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
{{ message }}
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
This project implements [twelve-factor app](https://12factor.net/) methodology for application deployment, with a clear separation between infrastructure provisioning and application deployment:
201
+
202
+
#### Infrastructure vs Application Deployment
203
+
204
+
**Important Distinction**: The twelve-factor methodology applies specifically to **application deployment**, not infrastructure provisioning.
205
+
206
+
-**Infrastructure Provisioning** (`make infra-apply`): Separate step that provisions the platform/environment
207
+
- Creates VMs, networks, firewall rules using Infrastructure as Code
208
+
- Applies cloud-init configuration
209
+
- Sets up the foundation where the application will run
210
+
-**This is NOT part of the twelve-factor Build stage**
211
+
212
+
#### Twelve-Factor Application Deployment Stages
213
+
214
+
The twelve-factor **Build, Release, Run** stages apply to the application deployment process (`make app-deploy`):
215
+
216
+
-**Build Stage**: Transform application code into executable artifacts
217
+
218
+
- Compile source code for production
219
+
- Create container images (Docker)
220
+
- Package application dependencies
221
+
- Generate static assets
222
+
223
+
-**Release Stage**: Combine built application with environment-specific configuration
224
+
225
+
- Apply environment variables and configuration files
226
+
- Combine application artifacts with runtime configuration
227
+
- Prepare deployment-ready releases
228
+
229
+
-**Run Stage**: Execute the application in the runtime environment
@@ -237,7 +352,7 @@ The project includes a comprehensive linting script that validates all file type
237
352
For verifying the functionality of the tracker from an end-user's perspective (e.g., simulating announce/scrape requests), refer to the **Smoke Testing Guide**. This guide explains how to use the official `torrust-tracker-client` tools to perform black-box testing against a running tracker instance without needing a full BitTorrent client.
4.**Test end-to-end**: Ensure the full deployment pipeline works
429
+
4.**Test twelve-factor workflow**: Ensure both infrastructure provisioning and application deployment work
430
+
```bash
431
+
make infra-apply # Test infrastructure provisioning
432
+
make app-deploy # Test application deployment
433
+
make health-check # Validate services
434
+
```
314
435
315
436
### For AI Assistants
316
437
@@ -327,7 +448,7 @@ When providing assistance:
327
448
328
449
Be mindful of the execution context for different types of commands. The project uses several command-line tools that must be run from specific directories:
329
450
330
-
-**`make` commands**: (e.g., `make help`, `make status`) must be run from the project root directory.
451
+
-**`make` commands**: (e.g., `make help`, `make infra-status`) must be run from the project root directory.
331
452
-**OpenTofu commands**: (e.g., `tofu init`, `tofu plan`, `tofu apply`) must be run from the `infrastructure/terraform/` directory.
332
453
-**Docker Compose commands**: (e.g., `docker compose up -d`, `docker compose ps`) are intended to be run _inside the deployed virtual machine_, typically from the `/home/torrust/github/torrust/torrust-tracker-demo/application` directory.
0 commit comments