Production deploy for musicshare.binarygnome.com
- docker-compose.prod.yml overlay: Caddy with automatic HTTPS on one origin (web at /, API at /api incl. websocket), internal-only Postgres/ Redis/API/web, secure cookies, private-network servers blocked, nightly pg_dump backups kept 14 days - deploy/export-db.sh and import-db.sh to carry a database to the server (same TOKEN_ENCRYPTION_KEY required for stored connections) - Base compose no longer requires apps/api/.env - README: deployment, Spotify via scrobblers, SMTP settings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzFywujuH9TiuXbr9vjoX8
This commit is contained in:
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# Save the local database to a file you can carry to the server.
|
||||
# deploy/export-db.sh [output-file]
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
out="${1:-musicshare-$(date +%Y%m%d-%H%M).dump}"
|
||||
docker compose exec -T postgres pg_dump -U musicshare -d musicshare --format=custom --no-owner > "$out"
|
||||
echo "Saved $(du -h "$out" | cut -f1) to $out"
|
||||
echo
|
||||
echo "IMPORTANT: connected services (Plex, Last.fm, Jellyfin...) are encrypted with TOKEN_ENCRYPTION_KEY."
|
||||
echo "Put the SAME key in deploy/production.env on the server, or those connections must be redone:"
|
||||
grep '^TOKEN_ENCRYPTION_KEY=' apps/api/.env 2>/dev/null | sed 's/=.*/=<copy the value from apps\/api\/.env>/' || true
|
||||
Reference in New Issue
Block a user