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

Commit ba4d174

Browse files
committed
fix: [#14] copy generated configuration files to persistent volume
- Add missing step to copy generated config files from application/storage/ to /var/lib/torrust/ - Copy tracker.toml, prometheus.yml, and nginx.conf to persistent volume after generation - Fixes container startup issues where services couldn't find configuration files - Ensures all generated configs are available in the persistent volume for Docker mounts - Resolves Prometheus restart loop and nginx 502 errors - Validates persistent data volume implementation with E2E tests Problem: Configuration files were generated in application/storage/ but Docker Compose was mounting from /var/lib/torrust/, causing containers to fail to start. Solution: Added explicit copy step in deploy-app.sh to move generated configs to persistent volume after configure-env.sh runs.
1 parent a0062c9 commit ba4d174

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

infrastructure/scripts/deploy-app.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,18 @@ release_stage() {
365365
fi
366366
fi
367367
368+
# Copy generated configuration files to persistent storage
369+
# These files are generated by configure-env.sh and need to be in the persistent volume
370+
if [ -f application/storage/tracker/etc/tracker.toml ]; then
371+
sudo cp application/storage/tracker/etc/tracker.toml /var/lib/torrust/tracker/etc/
372+
fi
373+
if [ -f application/storage/prometheus/etc/prometheus.yml ]; then
374+
sudo cp application/storage/prometheus/etc/prometheus.yml /var/lib/torrust/prometheus/etc/
375+
fi
376+
if [ -f application/storage/proxy/etc/nginx-conf/nginx.conf ]; then
377+
sudo cp application/storage/proxy/etc/nginx-conf/nginx.conf /var/lib/torrust/proxy/etc/nginx-conf/
378+
fi
379+
368380
# Ensure torrust user owns all persistent data
369381
sudo chown -R torrust:torrust /var/lib/torrust
370382
" "Setting up persistent data volume directory structure"

0 commit comments

Comments
 (0)