Skip to content

Commit 18c9613

Browse files
authored
Merge pull request #42 from metno/41-create-better-docs-for-getting-started
update docs for getting started. Remove other, outdated docs
2 parents 036ac06 + db9f750 commit 18c9613

3 files changed

Lines changed: 64 additions & 109 deletions

File tree

GETTING_STARTED.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Getting Started
2+
3+
This guide walks you through running Forti locally using Docker Compose.
4+
5+
## Prerequisites
6+
7+
- [Docker](https://docs.docker.com/get-docker/) with Compose support
8+
- [just](https://just.systems/) (optional, but convenient)
9+
10+
## 1. Prepare forecast data
11+
12+
Forti reads forecast data from a local directory in [its own binary format](https://github.com/metno/forti-internalformat). You need to populate `data/forecast/` (relative to this repository root) before starting the stack — this is where Docker Compose expects data by default.
13+
14+
### Using forti-prep (recommended)
15+
16+
[forti-prep](https://github.com/metno/forti-prep) is a tool that converts NetCDF forecast files into the format Forti expects. Requires [uv](https://docs.astral.sh/uv/).
17+
18+
```bash
19+
git clone https://github.com/metno/forti-prep
20+
cd forti-prep
21+
uv sync
22+
uv run forti-prep \
23+
--config sample_config.json \
24+
--output-dir /path/to/forti/data/forecast \
25+
--version $(date +%s) \
26+
your-forecast.nc
27+
```
28+
29+
See the [forti-prep README](https://github.com/metno/forti-prep) for details on writing a config file for your specific NetCDF input.
30+
31+
### Writing your own loader
32+
33+
If you have a different data source, you can produce the data directly in Forti's internal format. See [forti-internalformat](https://github.com/metno/forti-internalformat) for a full description of the format and Go code you can use to write it.
34+
35+
## 2. Start the stack
36+
37+
From the repository root, using just:
38+
39+
```bash
40+
just run-docker
41+
```
42+
43+
Or directly with Docker Compose:
44+
45+
```bash
46+
cd deploy
47+
docker compose up --build
48+
```
49+
50+
This starts `rawdataforecaster` and `jsonfrontend`. The first run will build the Docker images, which may take a few minutes.
51+
52+
## 3. Verify
53+
54+
```bash
55+
curl 'http://localhost:8080/?lat=59&lon=11'
56+
```
57+
58+
You should get a JSON forecast response.
59+
60+
## Next steps
61+
62+
See [`deploy/README.md`](deploy/README.md) for configuration options, including how to enable `correctedforecaster` and how to override data paths.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ The run ID may be found by looking at the correct build on the [Actions](https:/
3737

3838
For `fortiup`, a binary artifact is built and uploaded (rather than a docker image) when a tag matching `fortiup/*` is pushed.
3939

40-
## Run locally
40+
## Getting started
4141

42-
[How to run f2 locally](run_locally.md)
42+
[Getting started guide](GETTING_STARTED.md)
4343

4444
## Architecture
4545

run_locally.md

Lines changed: 0 additions & 107 deletions
This file was deleted.

0 commit comments

Comments
 (0)