Skip to content

feat(deploy): publish image to GHCR and add Synology compose - #251

Closed
Claudio-Chies wants to merge 3 commits into
dbrgn:mainfrom
Claudio-Chies:deployment-ci
Closed

feat(deploy): publish image to GHCR and add Synology compose#251
Claudio-Chies wants to merge 3 commits into
dbrgn:mainfrom
Claudio-Chies:deployment-ci

Conversation

@Claudio-Chies

@Claudio-Chies Claudio-Chies commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Wrong Target repo, sry

Summary by CodeRabbit

  • New Features

    • Added automatic elevation and country code lookup when editing location markers on the map.
    • Improved flight form with auto-populated launch date and smart time adjustment between launch and landing times.
    • Added zoom-in hint for map to assist with elevation auto-fill.
  • Bug Fixes

    • Fixed IGC file import to properly apply metadata to form fields.
  • Chores

    • Added Docker deployment configuration and CI/CD workflow for container publishing.
    • Consolidated time utility functions for improved maintainability.

Claudio-Chies and others added 3 commits June 23, 2026 07:42
* FlightLogging: improve date behaviour

* Misc: extracted time functionalities to seperate file with tests.
…#3)

* Add elevation and country code lookup functionality to map components

* chore: sync translation files
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fb92dd2a-7b6d-4a52-87a2-dfdbde18f382

📥 Commits

Reviewing files that changed from the base of the PR and between b153211 and 21fa392.

📒 Files selected for processing (12)
  • .env
  • .github/workflows/publish-ghcr.yml
  • docker-compose.synology.yml
  • frontend/src/lib/components/BaseMap.svelte
  • frontend/src/lib/components/SingleMap.svelte
  • frontend/src/lib/components/map.ts
  • frontend/src/lib/time-helpers.test.ts
  • frontend/src/lib/time-helpers.ts
  • frontend/src/routes/flights/FlightForm.svelte
  • frontend/src/routes/locations/LocationForm.svelte
  • frontend/src/translations/de/translation.json
  • frontend/src/translations/en/translation.json

Walkthrough

This PR adds map-driven auto-fill of elevation and country code in the location form by querying invisible MapLibre vector layers on marker placement. It also introduces a shared time-helpers.ts module (with tests) and refactors FlightForm to use it, improving default initialization, reactive landing-time clamping, and IGC field overwrite behavior. Separately, a GHCR publish workflow and Synology docker-compose are added.

Changes

Map-Driven Elevation & Country Lookup

Layer / File(s) Summary
BaseMap: vector layers, lookup functions, and marker trigger
frontend/src/lib/components/BaseMap.svelte
Adds a minimum-zoom constant, two exported callback props (onElevationLookup, onCountryLookup), internal functions that query rendered terrain-contour and country-boundary features, marker-update hooks that call those functions, and two invisible fill layers loaded only when editable is true.
SingleMap: prop forwarding
frontend/src/lib/components/SingleMap.svelte
Adds the two new optional callback props to SingleMap's public API and passes them through to BaseMap.
LocationForm: handlers, hint UI, wiring, styles, and translations
frontend/src/routes/locations/LocationForm.svelte, frontend/src/translations/en/translation.json, frontend/src/translations/de/translation.json, frontend/src/lib/components/map.ts
Adds showElevationHint state and two handler functions, wires them to SingleMap, renders a conditional zoom-in hint near the elevation field, adds CSS for the hint container, and adds hint--zoom-in-elevation strings in English and German. Updates the Mapbox access token.

Time Helpers Module & FlightForm Refactor

Layer / File(s) Summary
time-helpers.ts: new utility module and tests
frontend/src/lib/time-helpers.ts, frontend/src/lib/time-helpers.test.ts
Introduces timeToMinutes, minutesToTime, hmsToTime, calculateFlightDuration, ymdToDateString, and isTimeBefore with full Vitest coverage including boundary values, rounding, midnight crossing, and leap-year cases.
FlightForm: import replacement, initialization, reactive clamping, and IGC overwrite
frontend/src/routes/flights/FlightForm.svelte
Replaces local time helper imports with shared utilities, auto-fills today and 00:00 for new flights, adds reactive logic that advances landingTime when it would precede launchTime, delegates duration to calculateFlightDuration, removes the local hmsToTimevalue helper, and changes IGC processing to always overwrite date/time/site/distance fields.

Deployment Infrastructure

Layer / File(s) Summary
Secret key config, GHCR publish workflow, and Synology docker-compose
.env, .github/workflows/publish-ghcr.yml, docker-compose.synology.yml
.env gains a ROCKET_SECRET_KEY placeholder with generation guidance. The GHCR workflow reuses existing test jobs, then builds and pushes the Docker image. The Synology docker-compose defines three services (db with healthcheck, api pulling from GHCR, web using Nginx) and a frontend-static named volume.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant