Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
68a66f7
Promote claude/dev to production
BigBill1418 Mar 23, 2026
62b141d
Promote claude/dev to production
BigBill1418 Mar 23, 2026
a7f492e
Promote claude/dev to production
BigBill1418 Mar 23, 2026
64c7a7e
Promote claude/dev to production
BigBill1418 Mar 25, 2026
fc1371b
Merge pull request #26 from BigBill1418/claude/fresh-session-setup-uw6vw
BigBill1418 Mar 25, 2026
c609739
Promote claude/dev to production
Mar 25, 2026
53fc7a8
Promote claude/dev to production
Mar 26, 2026
dfbf419
Promote claude/dev to production
Mar 26, 2026
f5a8a59
Promote claude/dev to production
Mar 26, 2026
34d4e2e
Promote claude/dev to production
Mar 28, 2026
d85118a
Promote claude/dev to production
Mar 29, 2026
f731be5
Expose PG on port 5435 for streaming replication to Backup-HQ
Apr 1, 2026
e4610b5
Remove per-repo deployer — now managed by NOC Master Control auto-dep…
Apr 1, 2026
a666295
Merge claude/dev: remove per-repo deployer
Apr 1, 2026
0aefa1c
Fix backend healthcheck — replace python/httpx with curl, add PG port…
claude Apr 1, 2026
c5e2d31
Fix backend healthcheck — replace python/httpx with curl — v2.55.3
claude Apr 1, 2026
53f4e45
Merge main — resolve PG port conflict (keep 5435)
claude Apr 1, 2026
9034d0b
Fix PG replication port: 5434 for Command, 5435 is Demo
Apr 1, 2026
e58c011
Bust Docker cache — force rebuild of apt layer to include curl — v2.55.4
claude Apr 1, 2026
33fd236
Fix watchtower: set DOCKER_API_VERSION=1.45 for Docker 29 compatibility
Apr 1, 2026
3e0b27e
Auto-repair admin password on startup when env doesn't match DB — v2.…
claude Apr 1, 2026
5b7d591
Fix backend healthcheck + auto-repair admin password on startup — v2.…
claude Apr 1, 2026
bf3b007
Merge main into feature branch — resolve Dockerfile cache-bust conflict
claude Apr 1, 2026
13c739a
Add GitHub Action to auto-merge claude/* branches into main
claude Apr 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/auto-merge-claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Auto-merge Claude branches to main

# Trigger on any push to claude/* branches
on:
push:
branches:
- 'claude/**'

jobs:
merge-to-main:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Merge into main
run: |
git checkout main
git merge origin/${{ github.ref_name }} -m "Auto-merge ${{ github.ref_name }} into main"
git push origin main
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Self-hosted mission management, flight log analysis, GPS flight replay with video export, AI report generation, invoicing, and real-time airspace monitoring for commercial drone operators.**

**Version 2.55.2** | [Quick Start](#quick-start) | [Features](#features) | [Configuration](#configuration) | [Contributing](CONTRIBUTING.md) | [License](LICENSE)
**Version 2.55.5** | [Quick Start](#quick-start) | [Features](#features) | [Configuration](#configuration) | [Contributing](CONTRIBUTING.md) | [License](LICENSE)

---

Expand Down
4 changes: 3 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM python:3.12-slim

# Install system dependencies for WeasyPrint, fonts, geospatial libs, and gosu
# Install system dependencies for WeasyPrint, fonts, geospatial libs, gosu, and curl
# Cache-bust: v2.55.5 (added curl for Docker healthcheck)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpango-1.0-0 \
Expand All @@ -17,6 +18,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
fonts-liberation \
fonts-dejavu-core \
fonts-noto-core \
curl \
gosu \
&& rm -rf /var/lib/apt/lists/* \
&& fc-cache -f
Expand Down
48 changes: 33 additions & 15 deletions backend/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,22 +208,46 @@ async def lifespan(app: FastAPI):
await seed_demo_data(demo_session)
logger.info("STARTUP: Demo data seeded")

# Post-seed verification: log the admin hash state
# Post-seed verification: ensure admin can actually log in
from app.models.user import User
from app.auth.jwt import verify_password
from app.auth.jwt import verify_password, hash_password
async with async_session() as verify_session:
result = await verify_session.execute(
select(User).where(User.username == settings.admin_username)
)
admin = result.scalar_one_or_none()
if admin:
env_matches = verify_password(settings.admin_password, admin.hashed_password)
_hash = admin.hashed_password or ""
_hash_ok = _hash.startswith("$2b$") and len(_hash) == 60
env_matches = verify_password(settings.admin_password, _hash) if _hash_ok else False
logger.info(
"STARTUP: Admin '%s' hash=%s... env_password_matches=%s",
"STARTUP: Admin '%s' hash=%s... hash_valid=%s env_password_matches=%s",
admin.username,
admin.hashed_password[:10] if admin.hashed_password else "EMPTY",
_hash[:10] if _hash else "EMPTY",
_hash_ok,
env_matches,
)

# Auto-repair: if env password doesn't match DB hash, fix it
# This handles migration/restore scenarios where the hash is
# corrupted, truncated, or from a different password.
if not env_matches:
new_hash = hash_password(settings.admin_password)
roundtrip_ok = verify_password(settings.admin_password, new_hash)
if roundtrip_ok:
admin.hashed_password = new_hash
await verify_session.commit()
logger.warning(
"STARTUP: Admin password hash REPAIRED — env password "
"did not match DB hash (hash_valid=%s). New hash=%s...",
_hash_ok, new_hash[:10],
)
else:
logger.critical(
"STARTUP: Admin password hash is WRONG and bcrypt "
"roundtrip FAILED — login will not work! "
"Run: docker compose exec backend python reset_admin.py"
)
else:
logger.critical("STARTUP: Admin user '%s' NOT FOUND after seed!", settings.admin_username)

Expand Down Expand Up @@ -301,7 +325,7 @@ async def lifespan(app: FastAPI):
app = FastAPI(
title="D.O.C — Drone Operations Command",
description="Self-hosted mission management, flight log analysis, AI report generation, invoicing, telemetry visualization, and real-time airspace monitoring for commercial drone operators.",
version="2.55.2",
version="2.55.5",
lifespan=lifespan,
)

Expand Down Expand Up @@ -411,15 +435,9 @@ async def log_requests(request: Request, call_next):


@app.get("/api/health")
async def health_check(db: AsyncSession = Depends(get_db)):
"""Health check — verifies DB connectivity for Docker healthcheck auto-recovery."""
from sqlalchemy import text
try:
await db.execute(text("SELECT 1"))
return {"status": "healthy", "service": "D.O.C — Drone Operations Command"}
except Exception as exc:
logger.error("Health check DB probe failed: %s", exc)
raise HTTPException(status_code=503, detail="Database unreachable")
async def health_check():
"""Lightweight health check for Docker healthcheck — just confirms the process is up."""
return {"status": "healthy", "service": "D.O.C — Drone Operations Command"}


@app.get("/api/branding")
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ services:
- WATCHTOWER_MONITOR_ONLY=${WATCHTOWER_MONITOR_ONLY:-false}
- WATCHTOWER_NOTIFICATION_URL=${WATCHTOWER_NOTIFICATION_URL:-}
- WATCHTOWER_NOTIFICATIONS_HOSTNAME=droneops-server
- DOCKER_API_VERSION=1.45
volumes:
- /var/run/docker.sock:/var/run/docker.sock

Expand Down Expand Up @@ -121,11 +122,11 @@ services:
ollama:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "python -c \"import httpx; r = httpx.get('http://localhost:8000/api/health'); r.raise_for_status()\""]
test: ["CMD-SHELL", "curl -sf http://localhost:8000/api/health || exit 1"]
interval: 15s
timeout: 10s
retries: 5
start_period: 30s
start_period: 45s

worker:
build:
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "doc-frontend",
"private": true,
"version": "2.55.2",
"version": "2.55.5",
"description": "Self-hosted drone operations command center — mission management, flight log analysis, GPS flight replay with video export, AI reports, invoicing, and airspace monitoring",
"keywords": [
"drone",
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Layout/AppShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function NavContent({
c="#5a6478"
style={{ fontFamily: "'Share Tech Mono', monospace", fontSize: '15px' }}
>
v2.55.2
v2.55.5
</Text>
<Tooltip label="Star on GitHub" position="right">
<ActionIcon
Expand Down Expand Up @@ -389,7 +389,7 @@ export default function AppLayout({ onLogout }: AppLayoutProps) {
fontSize: '15px',
}}
>
v2.55.2
v2.55.5
</Text>
<Tooltip label="Star on GitHub" position="right">
<ActionIcon
Expand Down
Loading