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

Commit 7ede6e4

Browse files
committed
docs: [#26] fix Docker Compose environment configuration example and improve formatting
- Correct ADR-007 container configuration example to show actual --env-file usage - Fix Docker Compose example from incorrect env_file property to correct command-line flag - Improve ADR table formatting in copilot instructions for better readability - Remove trailing spaces and minor formatting improvements
1 parent 207c404 commit 7ede6e4

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

.github/copilot-instructions.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,14 @@ torrust-tracker-demo/
186186

187187
Key design decisions are documented in `docs/adr/`. Contributors should review relevant ADRs when working on related features:
188188

189-
| ADR | Title | Description |
190-
| ----------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------- |
191-
| [ADR-001](../docs/adr/001-makefile-location.md) | Makefile Location | Why the main Makefile is at repository root |
192-
| [ADR-002](../docs/adr/002-docker-for-all-services.md) | Docker for All Services | Why we use Docker for all services including UDP tracker |
193-
| [ADR-003](../docs/adr/003-use-mysql-over-mariadb.md) | Use MySQL Over MariaDB | Database backend selection rationale |
194-
| [ADR-004](../docs/adr/004-configuration-approach-files-vs-environment-variables.md) | Configuration Approach | Files vs environment variables for configuration |
195-
| [ADR-005](../docs/adr/005-sudo-cache-management-for-infrastructure-operations.md) | Sudo Cache Management | Managing sudo credentials during infrastructure operations |
196-
| [ADR-006](../docs/adr/006-ssl-certificate-generation-strategy.md) | SSL Certificate Generation Strategy | Approach for SSL certificate management |
189+
| ADR | Title | Description |
190+
| ----------------------------------------------------------------------------------- | ---------------------------------------- | --------------------------------------------------------------------- |
191+
| [ADR-001](../docs/adr/001-makefile-location.md) | Makefile Location | Why the main Makefile is at repository root |
192+
| [ADR-002](../docs/adr/002-docker-for-all-services.md) | Docker for All Services | Why we use Docker for all services including UDP tracker |
193+
| [ADR-003](../docs/adr/003-use-mysql-over-mariadb.md) | Use MySQL Over MariaDB | Database backend selection rationale |
194+
| [ADR-004](../docs/adr/004-configuration-approach-files-vs-environment-variables.md) | Configuration Approach | Files vs environment variables for configuration |
195+
| [ADR-005](../docs/adr/005-sudo-cache-management-for-infrastructure-operations.md) | Sudo Cache Management | Managing sudo credentials during infrastructure operations |
196+
| [ADR-006](../docs/adr/006-ssl-certificate-generation-strategy.md) | SSL Certificate Generation Strategy | Approach for SSL certificate management |
197197
| [ADR-007](../docs/adr/007-two-level-environment-variable-structure.md) | Two-Level Environment Variable Structure | Security-focused separation of infrastructure and container variables |
198198

199199
## 🛠️ Development Workflow

docs/adr/007-two-level-environment-variable-structure.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,18 @@ envsubst < "infrastructure/config/templates/docker-compose.env.tpl" > "applicati
162162

163163
### For Container Configuration
164164

165-
```yaml
166-
# docker-compose.yaml
167-
services:
168-
tracker:
169-
env_file: .env # Only contains container-relevant variables
170-
environment:
171-
- TRACKER_ADMIN_TOKEN=${TRACKER_ADMIN_TOKEN}
165+
```bash
166+
# Docker Compose command (in deploy-app.sh)
167+
docker compose --env-file /var/lib/torrust/compose/.env up -d
168+
169+
# The .env file contains only container-relevant variables
170+
# and is passed to Docker Compose via the --env-file flag
172171
```
173172

174173
## Benefits
175174

176175
1. **Security**: Reduced container attack surface
177-
2. **Clarity**: Clear separation between infrastructure and application concerns
176+
2. **Clarity**: Clear separation between infrastructure and application concerns
178177
3. **Maintainability**: Easier to understand what variables are used where
179178
4. **Flexibility**: Can generate different container environments from same base
180179
5. **Compliance**: Aligns with twelve-factor configuration principles

0 commit comments

Comments
 (0)