2023-10-16 21:58:50 +02:00
|
|
|
# RAR-Index
|
|
|
|
It's some project for my school which is supposed to index _rar_-archives and make them searchable over a very ugly web frontend.
|
|
|
|
|
2023-11-07 12:58:40 +01:00
|
|
|
**!!Works only on python 3.10 and newer!!**
|
|
|
|
|
2023-10-20 00:26:56 +02:00
|
|
|
## Features
|
|
|
|
- Add and delete archives
|
|
|
|
- edit their labels (as their owner)
|
|
|
|
- search through archives based on:
|
|
|
|
- Keywords
|
|
|
|
- Category
|
|
|
|
- log into a user account
|
2023-10-20 18:10:10 +02:00
|
|
|
- log out
|
|
|
|
- view the user details
|
|
|
|
- update the display name and password
|
2023-10-20 00:26:56 +02:00
|
|
|
|
2023-10-16 21:58:50 +02:00
|
|
|
## Downloading
|
|
|
|
```bash
|
2023-10-20 00:26:56 +02:00
|
|
|
git clone https://git.marcelsite.com/marcel/rar-index-py
|
|
|
|
cd rar-index-py
|
2023-10-16 21:58:50 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
### Baremetal
|
|
|
|
Install the dependencies:
|
|
|
|
```bash
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
2023-10-19 19:39:54 +02:00
|
|
|
Edit the configuration:
|
2023-10-16 21:58:50 +02:00
|
|
|
```bash
|
|
|
|
cd flask
|
2023-10-19 19:39:54 +02:00
|
|
|
cp example.config.py config.py
|
|
|
|
$EDITOR config.py
|
|
|
|
```
|
|
|
|
Start the server:
|
|
|
|
```bash
|
2023-10-16 21:58:50 +02:00
|
|
|
python app.py
|
|
|
|
```
|
2023-10-20 00:26:56 +02:00
|
|
|
This will start the server in a development environment. The Docker image is built with uWSGI for production use.
|
2023-10-16 21:58:50 +02:00
|
|
|
|
|
|
|
### Docker
|
2023-10-20 00:26:56 +02:00
|
|
|
I recommend just using the provided package on this server:
|
|
|
|
```yml
|
|
|
|
version: "2.4"
|
|
|
|
services:
|
|
|
|
db:
|
|
|
|
image: mariadb:latest
|
|
|
|
environment:
|
2023-10-20 18:13:55 +02:00
|
|
|
- MARIADB_DATABASE=rar_index
|
2023-10-20 00:26:56 +02:00
|
|
|
- MARIADB_USER=rar_index_app
|
|
|
|
- MARIADB_PASSWORD=password
|
|
|
|
- MYSQL_ROOT_PASSWORD=secretadminpassword
|
|
|
|
volumes:
|
|
|
|
- db-data:/var/lib/mysql
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
app:
|
|
|
|
image: git.marcelsite.com/marcel/rar-index-app
|
|
|
|
container_name: rar-index-app
|
|
|
|
environment:
|
|
|
|
- MARIADB_USER=rar_index_app
|
|
|
|
- MARIADB_HOST=db
|
|
|
|
- MARIADB_PASSWORD=password
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
db-data:
|
|
|
|
|
|
|
|
```
|
|
|
|
This will make the server accessible from anywhere over port 5000.
|
2023-10-16 21:58:50 +02:00
|
|
|
|
|
|
|
## Contributing
|
|
|
|
I don't recommend wasting your time on this project. It is only created to get a (hopefully) good grade in school.
|