feat: seed SSH users from UPTOP_ADMIN_KEY env and UPTOP_KEYS file
CI / test (pull_request) Successful in 2m59s
CI / lint (pull_request) Failing after 1m6s
CI / vulncheck (pull_request) Successful in 1m6s

On startup, reads SSH public keys from two sources:
- UPTOP_ADMIN_KEY env var (single key, quick setup)
- UPTOP_KEYS file path (authorized_keys format, team setup)

Keys already in the database are skipped (idempotent across restarts).
All seeded users get admin role. Username parsed from key comment.

Dockerfile already sets UPTOP_KEYS=/data/authorized_keys — Docker users
just drop their keys file in ./data/ and start the container.
This commit is contained in:
2026-05-27 16:32:33 -04:00
parent ea721601ab
commit d5587958e8
2 changed files with 81 additions and 0 deletions
+2
View File
@@ -14,5 +14,7 @@ services:
- UPTOP_HTTP_PORT=8080
- UPTOP_STATUS_ENABLED=true
- UPTOP_STATUS_TITLE=System Status
# SSH access: add your public key via env var or authorized_keys file
# - UPTOP_ADMIN_KEY=ssh-ed25519 AAAA... you@host
volumes:
- ./data:/data