kemono2/docs/FAQ.md

117 lines
2.4 KiB
Markdown
Raw Normal View History

2024-07-04 22:08:17 +02:00
# Frequently Asked Questions
2024-11-26 00:11:49 +01:00
## My dump doesn't migrate.
2024-07-04 22:08:17 +02:00
_This assumes a running setup._
1. Enter into database container:
```sh
docker exec \
--interactive \
--username=nano \
--tty kemono-db psql \
kemonodb
```
2. Check the contents of the`posts`table.
```sql
SELECT * FROM posts;
```
_Most likely it has`0`rows._
3. Move contents of`booru_posts`  ➞  `posts`
```sql
INSERT INTO posts SELECT * FROM booru_posts ON CONFLICT DO NOTHING;
```
4. Restart the archiver.
```sh
docker restart kemono-archiver
```
If you see a bunch of log entries from`kemono-db`, <br>
then this indicates that the archiver is doing it's job.
5. In case the frontend still doesn't show <br>
the artists / posts, clear the redis cache.
```sh
docker exec \
kemono-redis \
redis-cli \
FLUSHALL
```
2024-11-26 00:11:49 +01:00
## How do I import from db dump?
2024-07-04 22:08:17 +02:00
1. Retrieve a database dump.
2. Run the following in the folder of said dump.
```sh
cat db-filename.dump \
| gunzip \
| docker exec \
--interactive kemono-db psql \
--username=nano kemonodb
```
3. Restart the archiver to trigger migrations.
```sh
docker restart kemono-archiver
```
If that didn't start the migrations, refer <br>
2024-11-26 00:11:49 +01:00
to[My Dump Doesn't Migrate](#my-dump-doesnt-migrate)section.
2024-07-04 22:08:17 +02:00
2024-11-26 00:11:49 +01:00
## How do I put files into nginx container?
2024-07-04 22:08:17 +02:00
1. Retrieve the files in required folder structure.
2. Copy them into nginx image.
```sh
docker \
cp ./ kemono-nginx:/storage
```
3. Add required permissions to that folder.
```sh
docker \
exec kemono-nginx \
chown --recursive \
nginx /storage
```
2024-11-26 00:11:49 +01:00
## How Do I Install Python 3.12 on Ubuntu 22?
Through a PPA (Personal Package Archives).
1. Install required tooling and add the PPA:
```sh
sudo apt install --assume-yes software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
```
2. Update local `apt` listing and install required python dependencies:
2024-07-04 22:08:17 +02:00
2024-11-26 00:11:49 +01:00
```sh
sudo apt update
sudo apt install \
python3.12 \
python3.12-dev \
python3.12-distutils
```
2024-07-04 22:08:17 +02:00
2024-11-26 00:11:49 +01:00
3. Confirm python 3.12 is installed
```sh
which python3.12
```