Merge pull request 'docs: add rough documentation about obs-portal' (#173) from feat/obs-portal-nachtigall into main

Reviewed-on: #173
Reviewed-by: teutat3s <teutat3s@noreply.git.pub.solar>
This commit is contained in:
Hendrik Sokolowski 2024-04-28 12:13:09 +00:00
commit fee6ce74c7
Signed by: pub.solar gitea
GPG key ID: F0332B04B7054873

32
docs/obs-portal.md Normal file
View file

@ -0,0 +1,32 @@
# OpenBikeSensor Portal
## Docker Containers
* portal
* worker
* db
## Run database migrations
After an upgrade it is sometimes necessary to run database migrations or regenerate tiles.
```
docker exec -ti obs-portal tools/upgrade.py
```
## Dump database
Save database dump to `dump.sql` in the current working directory.
```
docker exec -ti --user postgres obs-portal-db pg_dump obs > dump.sql
```
## Restore database
Load database dump from `dump.sql` file.
`obs` database needs to exist before importing the dump.
```
cat dump.sql | docker exec -ti --user postgres obs-portal-db psql obs
```