b0txec 39478bde1d
CI / backend (push) Successful in 1m9s
CI / frontend (push) Successful in 1m0s
Add a literal, runnable VPS release runbook
VPS_STAGING_PLAN.md describes the release process at a policy level; the
changelog table narrates what happened after each release. Neither is a
step-by-step "how" a person (or Guntis) could actually follow without
already knowing the process from having run it. This is that document --
copy-pasteable commands, in order, parameterized by commit SHA.

Writing it surfaced a real regression: earlier releases (through ef64895)
retained the release tarball under /srv/weathertool/releases/<sha>/ and
backed up .env.staging before every edit; tonight's releases (0be325f,
9bab93d, 001b014) did neither -- I'd been deleting the transfer copy from
/tmp after each deploy and sed-ing .env.staging directly with no backup.
Practical cost: rolling back to any of tonight's releases would have meant
rebuilding from git history and re-transferring, instead of just re-pointing
.env.staging at an already-present image. Closed the gap for the current
live release (001b014) retroactively -- exported it directly on the VPS
(checksum matches the exact bytes shipped tonight, confirming no drift) and
backed up the current .env.staging -- and the runbook restores both habits
going forward.
2026-08-25 11:51:23 +03:00
2025-03-09 20:02:16 +02:00
2025-03-01 18:16:56 +02:00
2025-03-02 22:03:27 +02:00

Weather Tool

Tool for downloading historical and real-time data from weather stations in Latvia. It aggregates and displays data for different time periods, cities, and weather parameters.

Setup

Rename .env-sample to .env and fill in credentials

Environment boundary

  • Windows: source editing, review, and Git operations only. Do not compile, build, run containers, install project dependencies, or test the application here.
  • Rocky Linux: the only development runtime; compile, build, run, seed, and test WeatherTool here.
  • Ubuntu VPS: deployment target only. It receives the reviewed release artifact built and verified on Rocky; it is not a development or build host.

Run

docker-compose up --build --no-cache --force-recreate

Web

http://0.0.0.0:9090/

nginx proxy config

server {
    listen 80;
    server_name laikazinas.lsm.lv;

    location / {
        proxy_pass http://localhost:9090; # Forward requests to the Scala app
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

Rocky development runtime

// 1st terminal
podman-compose up postgres

// 2nd terminal
sbt run

// 3rd terminal
cd web/
npm run dev

Run one file sbt "runMain grib.GribParserTest"

Backend Tech:

  • scala: cats-effects, http4s, fs2, circe, scalatest
  • postgres

Frontend Tech:

  • SolidJS
  • Vite

Fly commands

// suspend instance
fly scale count 0
// check display
fly ssh console
df -h
fly scale memory 512
S
Description
wep app for using meteo data
Readme 27 MiB
Languages
TypeScript 60.1%
Scala 33.3%
CSS 5.7%
HTML 0.4%
Dockerfile 0.4%
Other 0.1%