**Motivations:** - Fix 401 error on anchorage API due to .env not being loaded correctly - Fix 502 error on dashboard due to service not running - Add backup script for mining keys and wallet descriptors - Improve service management with startup scripts and systemd services **Root causes:** - dotenv.config() was called without explicit path, causing .env to be loaded from wrong directory - Services were not started automatically, causing 502 errors - No backup mechanism for critical keys and wallet data **Correctifs:** - Improved .env loading in api-anchorage/src/server.js with explicit path - Improved .env loading in signet-dashboard/src/server.js with explicit path - Added backups/ directory to .gitignore to prevent committing sensitive data - Created export-backup.sh script for backing up mining keys and wallet descriptors **Evolutions:** - Added api-anchorage/start.sh script for proper service startup - Added api-anchorage/anchorage-api.service systemd service file - Added fixKnowledge/api-anchorage-401-error.md documentation - Added fixKnowledge/dashboard-502-error.md documentation - Updated mempool submodule **Pages affectées:** - .gitignore (added backups/) - api-anchorage/src/server.js (improved .env loading) - api-anchorage/start.sh (new) - api-anchorage/anchorage-api.service (new) - signet-dashboard/src/server.js (improved .env loading) - export-backup.sh (new) - fixKnowledge/api-anchorage-401-error.md (new) - fixKnowledge/dashboard-502-error.md (new) - mempool (submodule updated)
22 lines
448 B
Desktop File
22 lines
448 B
Desktop File
[Unit]
|
|
Description=Bitcoin Signet Anchorage API
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=ncantu
|
|
WorkingDirectory=/home/ncantu/Bureau/code/bitcoin/api-anchorage
|
|
Environment=NODE_ENV=production
|
|
ExecStart=/usr/bin/node /home/ncantu/Bureau/code/bitcoin/api-anchorage/src/server.js
|
|
Restart=always
|
|
RestartSec=10
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
|
|
# Sécurité
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|