Compare commits

..

3 commits

Author SHA1 Message Date
d94a7e1864
Updated README.md files
Some checks failed
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
2025-03-05 01:18:26 +02:00
73353aed3f
Updated database instructions 2025-03-05 00:17:30 +02:00
7f229a3d6e
Added commit hash in config file 2025-03-04 22:04:59 +02:00
4 changed files with 8 additions and 5 deletions

View file

@ -41,14 +41,14 @@ pyenv eases the use of different Python versions, and as not all Linux distros o
- Enable `USE_MYSQL` flag in config.py
- Install MariaDB by following instructions [here](https://downloads.mariadb.org/mariadb/repositories/)
- Run the following commands logged in as your root db user (substitute for your own `config.py` values if desired):
- `CREATE USER 'test'@'localhost' IDENTIFIED BY 'test123';`
- `GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost';`
- `FLUSH PRIVILEGES;`
- `CREATE USER 'nyaauser'@'localhost' IDENTIFIED BY 'nyaapass';`
- `CREATE DATABASE nyaav3 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;`
- `GRANT ALL PRIVILEGES ON nyaav3.* TO 'nyaauser'@'localhost';`
- `FLUSH PRIVILEGES;`
### Finishing up
- Run `python db_create.py` to create the database and import categories
- Follow the advice of `db_create.py` and run `python db_migrate.py stamp head` to mark the database version for Alembic
- ~~Follow the advice of `db_create.py` and run `python db_migrate.py stamp head` to mark the database version for Alembic~~
- Start the dev server with `python run.py`
- When you are finished developing, deactivate your virtualenv with `pyenv deactivate` or `source deactivate` (or just close your shell session)

View file

@ -231,3 +231,6 @@ CACHE_THRESHOLD = 8192
# To actually make this work across multiple worker processes, use redis
# RATELIMIT_STORAGE_URL="redis://host:port"
RATELIMIT_KEY_PREFIX="nyaaratelimit_"
# Use this to show the commit hash in the footer (see layout.html)
# COMMIT_HASH="[enter your commit hash here]";

View file

@ -331,7 +331,7 @@
<footer style="text-align: center;">
<p>Dark Mode: <a href="#" id="themeToggle">Toggle</a></p>
{% if config.COMMIT_HASH %}
<p>Commit: <a href="https://github.com/nyaadevs/nyaa/tree/{{ config.COMMIT_HASH }}">{{ config.COMMIT_HASH[:7] }}</a></p>
<p>Commit: <a href="https://github.com/sb745/NyaaV3/tree/{{ config.COMMIT_HASH }}">{{ config.COMMIT_HASH[:7] }}</a></p>
{% endif %}
</footer>
</body>