64 lines
1.7 KiB
Markdown
64 lines
1.7 KiB
Markdown
# Pyrom
|
|
python/flask port of [porom](https://git.poto.cafe/yagich/porom)
|
|
|
|
this is now the canonical implementation of porom. it's compatible with the database of porom.
|
|
|
|
# License
|
|
Released under [CNPLv7+](https://thufie.lain.haus/NPL.html).
|
|
Please read the [full terms](./LICENSE.md) for proper wording.
|
|
|
|
# installing & first time setup
|
|
## docker (production)
|
|
create `config/secrets.prod.env` according to `config/secrets.prod.env.example`
|
|
|
|
```bash
|
|
$ docker compose up
|
|
```
|
|
|
|
- opens port 8080
|
|
- exposes `data/db` and `data/static` for data backup and persistence
|
|
|
|
make sure to run it in an interactive session the first time, because it will spit out the password to the auto-created admin account.
|
|
|
|
alternatively, if you already had porom running before, put the db file (`db.prod.sqlite`) in `data/db` and it will Just Work.
|
|
|
|
## manual (development)
|
|
1. install python >= 3.11, sqlite3, libargon2, and imagemagick & clone repo
|
|
2. create a venv:
|
|
|
|
```bash
|
|
$ python -m venv .venv
|
|
$ source .venv/bin/activate
|
|
```
|
|
|
|
3. install requirements:
|
|
|
|
```bash
|
|
$ pip install -r requirements.txt
|
|
```
|
|
|
|
4. run dev server:
|
|
|
|
```bash
|
|
$ python -m app.run
|
|
```
|
|
|
|
the server will run on localhost:8080. when run for the first time, it will create an admin account and print its credentials to the terminal, so make sure to run this in an interactive session.
|
|
|
|
press <kbd>Ctrl</kbd>+<kbd>C</kbd> to stop the server.
|
|
|
|
to deactivate the venv:
|
|
|
|
```bash
|
|
$ deactivate
|
|
```
|
|
|
|
when you want to run the server again, make sure to activate the venv first:
|
|
```bash
|
|
$ source .venv/bin/activate
|
|
$ python -m app.run
|
|
```
|
|
|
|
# icons
|
|
the icons in the `data/static/misc/` folder are by [Gabriele Malaspina](https://www.figma.com/community/file/1136337054881623512/iconcino-v2-0-0-free-icons-cc0-1-0-license)
|