mirror of
https://github.com/wrolpi/wrolpi-help.git
synced 2026-11-22 16:06:20 -05:00
Updating Channel page docs. Adding new Databases docs, as well as docs about the new map database.
This commit is contained in:
parent
7b306bc7d9
commit
6e25ca098d
15 changed files with 174 additions and 40 deletions
|
|
@ -33,6 +33,7 @@ echo >> ${logfile}
|
|||
echo start $(date +"%Y-%m-%d %H:%M:%S") >> ${logfile}
|
||||
/usr/bin/rsync \
|
||||
--exclude="lost+found" \
|
||||
--exclude="tags" \
|
||||
-avue ssh \
|
||||
wrolpi@PRIMARY_IP_ADDRESS:/media/wrolpi/* \
|
||||
/media/wrolpi/ \
|
||||
|
|
|
|||
42
docs/system/databases.md
Normal file
42
docs/system/databases.md
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# Databases
|
||||
|
||||
WROLPi has two major Postgresql databases, the main (API) database, and the map database.
|
||||
|
||||
## Main Database
|
||||
|
||||
This contains the tables for the API.
|
||||
|
||||
### Service
|
||||
|
||||
`postgresql@15-main.service`
|
||||
|
||||
### Tables
|
||||
|
||||
| Name | Purpose | Relations | `/opt/wrolpi` File |
|
||||
|------------------|---------------------------------------------------------|---------------------------|-------------------------------|
|
||||
| alembic_version | Tracks Alembic migration. | | `alembic` |
|
||||
| archive | Data about a FileGroup Archive. | file_group_id, domain_id | `modules/archive/models.py` |
|
||||
| channel | Data about a video Channel. | | `modules/videos/models.py` |
|
||||
| directory | Directories in the media directory. | | `wrolpi/files/models.py` |
|
||||
| domains | Groups Archives by shared URL domain. | | `modules/archive/models.py` |
|
||||
| download | Data about what should be downloaded and when. | | `wrolpi/downloader.py` |
|
||||
| ebook | Data about FileGroups that are books. | file_group_id | `wrolpi/files/ebooks.py` |
|
||||
| file_group | Each record is a group of files that share a stem. | | `wrolpi/files/models.py` |
|
||||
| inventory | A collection of items. | | `modules/inventory/models.py` |
|
||||
| item | An item in an inventory. | inventory_id | `modules/inventory/models.py` |
|
||||
| map_file | Data about PBF files (if they have been imported, etc.) | | `modules/map/models.py` |
|
||||
| tag | Data about a Tag (name, color, etc.) | | `wrolpi/tags.py` |
|
||||
| tag_file | A FileGroup that has been tagged. | tag_id, file_group_id | `wrolpi/tags.py` |
|
||||
| tag_zim | An entry (article) that was tagged in a Zim file. | tag_id, zim_id, zim_entry | `modules/zim/models.py` |
|
||||
| video | Data about a FileGroup Video | file_group_id, channel_id | `modules/videos/models.py` |
|
||||
| wrolpi_flag | Long-term flags that have occurred in the API. | | `wrolpi/flags.py` |
|
||||
| zim | A Zim file | | `modules/zim/models.py` |
|
||||
| zim_subscription | A recurring download of a Zim file. | | `modules/zim/models.py` |
|
||||
|
||||
## Map Database
|
||||
|
||||
This contains tables for the OpenStreetMap.
|
||||
|
||||
### Service
|
||||
|
||||
`postgresql@15-map.service`
|
||||
|
|
@ -33,15 +33,23 @@ on a new Raspberry Pi.
|
|||
|
||||
1. Unplug your Raspberry Pi
|
||||
2. Insert the micro SD card from step 2 into your Raspberry Pi
|
||||
3. Connect any peripherals to your Raspberry Pi, then turn it on.
|
||||
4. Login as the **pi** user with the password **wrolpi**
|
||||
5. Launch the Terminal application
|
||||
1. Change your password with: `passwd`
|
||||
2. Modify fstab to mount your external drive to **/media/wrolpi**
|
||||
3. Connect any peripherals to your Raspberry Pi.
|
||||
4. Boot your Raspberry Pi.
|
||||
5. Choose your Country/Language/Timezone.
|
||||
6. Choose your own username and password (do not use the wrolpi user).
|
||||
7. Skip "Wi-Fi Selection", it is not required.
|
||||
8. Choose your favorite browser.
|
||||
9. Skip "Raspberry Pi Connect".
|
||||
10. Skip "Update Software".
|
||||
11. Restart.
|
||||
12. Login using the user you created above.
|
||||
13. Launch the Terminal application
|
||||
1. Modify fstab to mount your external drive to **/media/wrolpi**
|
||||
* `echo '/dev/sda1 /media/wrolpi auto defaults,nofail 0 0' | sudo tee -a /etc/fstab`
|
||||
3. Finish the installation with the repair script:
|
||||
* `sudo bash /opt/wrolpi/repair.sh`
|
||||
4. Reboot: `sudo reboot`
|
||||
2. Finish the installation with the repair script:
|
||||
* `/opt/wrolpi/repair.sh`
|
||||
3. Reboot: `sudo reboot`
|
||||
14. Join the Hotspot, browse to https://wrolpi.local or, the IP address of your WROLPi!
|
||||
|
||||
## Debian
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ and tertiary options to use your WROLPi may be available.
|
|||
|----------|-------------------------------------------|--------------------------------------------------------------------------------|-------------------------------------------------------------------|
|
||||
| Videos | [React App](../modules/videos/index.md) | [Open video files with VLC.](../modules/videos/index.md#videos-without-wrolpi) | Open subtitle files with a text editor. |
|
||||
| Archives | [React App](../modules/archives/index.md) | Open Archive files directly with Chromium | Readability files can be opened with a text editor. |
|
||||
| Map | [React App](../modules/map/index.md) | Map is directly accessible on port `:8084` | None |
|
||||
| Zim | [React App](../modules/zim/index.md) | Kiwix server is directly accessible on port `:8085` | [Kiwix application](../modules/zim/index.md#kiwix-without-wrolpi) |
|
||||
| Help | React App | Help server is directly accessible on port `:8086` | Markdown files are available in `/opt/wrolpi-help/docs` |
|
||||
| Tags | React App | Browse the Tags Directory: `/media/wrolpi/tags` | Read the config: `/media/wrolpi/config/tags.yaml` |
|
||||
| Map | [React App](../modules/map/index.md) | Map is accessible on port `:8084` | None |
|
||||
| Zim | [React App](../modules/zim/index.md) | Kiwix server is accessible on port `:8085` | [Kiwix application](../modules/zim/index.md#kiwix-without-wrolpi) |
|
||||
| Help | React App | Help server is accessible on port `:8086` | Markdown files are available in `/opt/wrolpi-help/docs` |
|
||||
| Tags | React App | Browse the Tags Directory: `/media/wrolpi/tags` | Read the config: `/media/wrolpi/config/tags.yaml` |
|
||||
| Files | [React App](../modules/files/index.md) | Browse the files on port `:8443` path `/media` (https://localhost:8443/media) | Browse the files using the desktop file browser |
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ files.
|
|||
|
||||
`/opt/wrolpi-blobs/`
|
||||
|
||||
This directory contains the files necessary to repair a WROLPi. For example, the `gis-map.dump.gz` file contains a
|
||||
This directory contains the files necessary to repair a WROLPi. For example, the `map-db-gis.dump` file contains a
|
||||
Postgresql dump of the map database. **It is best to leave this directory as-is.**
|
||||
|
||||
## WROLPi Help
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@ WROLPi services are controlled by `systemd`.
|
|||
|
||||
You can view and control the WROLPi services using these commands:
|
||||
|
||||
| Service | Status | Logs | Restart | Stop | Start |
|
||||
|-----------|---------------------------------|------------------------------|----------------------------------|-------------------------------|--------------------------------|
|
||||
| API | `systemctl status wrolpi-api` | `journalctl -u wrolpi-api` | `systemctl restart wrolpi-api` | `systemctl stop wrolpi-api` | `systemctl start wrolpi-api` |
|
||||
| React App | `systemctl status wrolpi-app` | `journalctl -u wrolpi-app` | `systemctl restart wrolpi-app` | `systemctl stop wrolpi-app` | `systemctl start wrolpi-app` |
|
||||
| Map | `systemctl status renderd` | `journalctl -u renderd` | `systemctl restart renderd` | `systemctl stop renderd` | `systemctl start renderd` |
|
||||
| Zim | `systemctl status wrolpi-kiwix` | `journalctl -u wrolpi-kiwix` | `systemctl restart wrolpi-kiwix` | `systemctl stop wrolpi-kiwix` | `systemctl start wrolpi-kiwix` |
|
||||
| Service | Status | Logs | Restart | Stop | Start |
|
||||
|-----------|-----------------------------------------------|------------------------------------------------|------------------------------------------------|---------------------------------------------|----------------------------------------------|
|
||||
| API | `systemctl status wrolpi-api` | `journalctl -u wrolpi-api` | `systemctl restart wrolpi-api` | `systemctl stop wrolpi-api` | `systemctl start wrolpi-api` |
|
||||
| React App | `systemctl status wrolpi-app` | `journalctl -u wrolpi-app` | `systemctl restart wrolpi-app` | `systemctl stop wrolpi-app` | `systemctl start wrolpi-app` |
|
||||
| Map | `systemctl status renderd` | `journalctl -u renderd` | `systemctl restart renderd` | `systemctl stop renderd` | `systemctl start renderd` |
|
||||
| Zim | `systemctl status wrolpi-kiwix` | `journalctl -u wrolpi-kiwix` | `systemctl restart wrolpi-kiwix` | `systemctl stop wrolpi-kiwix` | `systemctl start wrolpi-kiwix` |
|
||||
| API DB | `systemctl status postgresql@15-main.service` | `journalctl status postgresql@15-main.service` | `systemctl restart postgresql@15-main.service` | `systemctl stop postgresql@15-main.service` | `systemctl start postgresql@15-main.service` |
|
||||
| Map DB | `systemctl status postgresql@15-map.service` | `journalctl status postgresql@15-map.service` | `systemctl restart postgresql@15-map.service` | `systemctl stop postgresql@15-map.service` | `systemctl start postgresql@15-map.service` |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue