Skip to content

Latest commit

 

History

History
175 lines (108 loc) · 2.62 KB

Develop.md

File metadata and controls

175 lines (108 loc) · 2.62 KB

Develop

For now Docker is a primary way of working on the repo.


Installation


  1. Create a virtual environment.

    #   Install the package if it's not installed
    pip install virtualenv
    
    #   Make it easier to manage python versions
    virtualenv --upgrade-embed-wheels
    virtualenv --python 3.8 venv

  2. Activate the virtual environment.

    #   Windows ➞ venv\Scripts\activate
    source venv/bin/activate

  3. Install python packages.

    pip install \
        --requirement requirements.txt

  4. Install  pre-commit  hooks.

    pre-commit install --install-hooks


IDE

IDE specific instructions.


VSCode


  1. Copy  .code-workspace  file.

    cp                                              \
        configs/workspace.code-workspace.example    \
        kemono-2.code-workspace

  2. Install the recommended extensions.



Docker


docker-compose --file docker-compose.dev.yml build
docker-compose --file docker-compose.dev.yml up

In a browser, visit  http://localhost:5000/


Database


  1. Register an account.

  2. Visit  http://localhost:5000/development

  3. Click either seeded or random generation.

    This will start a mock import process,
    which will also populate the database.


Files

TBD


Build

docker-compose build
docker-compose up --detach

In a browser, visit  http://localhost:8000/



Manual

TODO : Write installation and setup instructions


This assumes you have  Python 3.8+  &  Node 12+  installed
as well as a running PostgreSQL server with Pgroonga.


#   Make sure your database is initialized
#   cd to kemono directory

pip install virtualenv
virtualenv venv

#   Windows ➞ venv\Scripts\activate 
source venv/bin/activate

pip install \
    --requirement requirements.txt

cd client               \
    && npm install      \
    && npm run build    \
    && cd ..

#   Open .env + Configure
cp .env.example .env

#   Open flask.cfg + Configure
cp flask.cfg.example flask.cfg

set FLASK_APP=server.py
set FLASK_ENV=development

flask run