Cleanup and env file

This commit is contained in:
Guntis Smaukstelis
2023-12-19 17:48:48 +02:00
parent ac8c74fda1
commit 7305718c34
18 changed files with 56 additions and 828 deletions
+16 -50
View File
@@ -2,66 +2,32 @@
Tool for downloading historical and real-time data from 33 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
## Run
```
docker-compose up node
docker-compose up scala
```
## Run
```
// scala
sbt run
## Web
[http://0.0.0.0:9080/](http://0.0.0.0:9080/)
// web
## Local development
```
// 1st terminal
sbt
// 2nd terminal
cd web/
npm run dev
```
**Author:** Guntis Smaukstelis
**Mentor:** Jānis Komuls
## Backend Tech:
- scala: cats-effects, http4s, fs2, circe, scalatest
- postgres
**Status:** Live
**URL:** [https://weather-tool.fly.dev/](https://weather-tool.fly.dev/)
**Used By:** State television weather news
**Repository:** [https://github.com/guntisdev/WeatherTool](https://github.com/guntisdev/WeatherTool)
## Backend Technologies:
- cats-effects
- http4s
- pureconfig
- fs2
- circe
- scalatest
## Frontend Technologies:
## Frontend Tech:
- SolidJS
- Vite
## Deployment:
- Docker
- Shell script
- Fly.io
## Database
```
SELECT * FROM public.weather WHERE datetime > '2023-12-9T00:00:00+00'::timestamptz;
DELETE FROM public.weather
SET TIMEZONE = 'Europe/Riga';
```
## Docker
```
docker pull postgres
docker run --name local-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres
docker stop local-postgres
docker start local-postgres
```
## Fly Postgres
```
fly machines list --app weather-tool-db
fly machines start <machine-id> --app weather-tool-db
fly proxy 15432:5432 -a weather-tool-db // map to local port for pgAdmin
```
- Vite