kemono2/docs/FAQ.md
2024-07-04 22:08:17 +02:00

2.7 KiB
Raw Permalink Blame History

Frequently Asked Questions


My dump doesn't migrate.

This assumes a running setup.


  1. Enter into database container:

    docker exec                 \
        --interactive           \
        --username=nano         \
        --tty kemono-db psql    \
        kemonodb
    

  2. Check the contents of thepoststable.

    SELECT * FROM posts;
    

    Most likely it has0rows.


  3. Move contents ofbooru_posts  ➞  posts

    INSERT INTO posts SELECT * FROM booru_posts ON CONFLICT DO NOTHING;
    

  4. Restart the archiver.

    docker restart kemono-archiver
    

    If you see a bunch of log entries fromkemono-db,
    then this indicates that the archiver is doing it's job.


  5. In case the frontend still doesn't show
    the artists / posts, clear the redis cache.

    docker exec         \
        kemono-redis    \
        redis-cli       \
        FLUSHALL
    


How do I git modules?

This assumes you haven't cloned the repository recursively.


  1. Initiate the submodules

    git submodule init
    git submodule update    \
        --recursive         \
        --init
    

  2. Switch to the archiver folder and
    add your fork to the remotes list.

    cd archiver
    git remote add <remote_name> <your_fork_link>
    

  3. Now you can interact with Kitsune repo the same
    way you do as if it was outside of project folder.



How do I import from db dump?


  1. Retrieve a database dump.


  2. Run the following in the folder of said dump.

    cat db-filename.dump                \
        | gunzip                        \
        | docker exec                   \
        --interactive kemono-db psql    \
        --username=nano kemonodb
    

  3. Restart the archiver to trigger migrations.

    docker restart kemono-archiver
    

    If that didn't start the migrations, refer
    toMy Dump Doesn't Migratesection.



How do I put files into nginx container?


  1. Retrieve the files in required folder structure.


  2. Copy them into nginx image.

    docker \
        cp ./ kemono-nginx:/storage
    

  3. Add required permissions to that folder.

    docker                  \
        exec kemono-nginx   \
        chown --recursive   \
        nginx /storage