Add Docker Compose deployment

compose.yaml runs playlistd with a Postgres database. Settings come from
.env (see .env.example), and Postgres must be healthy before playlistd
starts.

The Dockerfile builds the web UI with Node and the server with Rust, then
copies both into a Debian slim image that runs as an unprivileged user. It
also installs the latest yt-dlp (with its YouTube scripts) and Deno, the
JavaScript runtime yt-dlp needs for YouTube. playlistd's port is only
published on 127.0.0.1 by default, since it has no login.

The image can't reach a database during the build, so the SQL query data
from `cargo sqlx prepare` is now committed in .sqlx/. Builds with
DATABASE_URL set still check queries against that database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018opPJMJjLWr4RqdG6vuK6p
This commit is contained in:
Claude committed 2026-11-14 10:22:23 +00:00
1 parent 77f9f29cc6
commit 0767c21a6f
42 files changed
+1633

No files matched your search

@@ -0,0 +1,74 @@
{
"db_name": "PostgreSQL",
"query": "SELECT * FROM \"cluster_mix_rule\"",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Uuid"
},
{
"ordinal": 1,
"name": "tracking_user",
"type_info": "Varchar"
},
{
"ordinal": 2,
"name": "months",
"type_info": "Int4"
},
{
"ordinal": 3,
"name": "cluster_count",
"type_info": "Int4"
},
{
"ordinal": 4,
"name": "playlist_size",
"type_info": "Int4"
},
{
"ordinal": 5,
"name": "familiar_ratio",
"type_info": "Float8"
},
{
"ordinal": 6,
"name": "name_template",
"type_info": "Varchar"
},
{
"ordinal": 7,
"name": "refresh_hours",
"type_info": "Int4"
},
{
"ordinal": 8,
"name": "last_run",
"type_info": "Timestamptz"
},
{
"ordinal": 9,
"name": "discovery_count",
"type_info": "Int4"
}
],
"parameters": {
"Left": []
},
"nullable": [
false,
false,
false,
true,
false,
false,
false,
false,
true,
false
]
},
"hash": "cff3fd3c455a6accdde8cc5b258ab80a934afa8f6a9003101ab9a7f0c659ac9c"
}