akatsuki

module
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2022 License: MIT

README

Akatsuki

Akatsuki is MyAnimeList anime database dump and REST API.

Powered by go-myanimelist library and MyAnimeList API as reference.

Features

More will be coming soon...

Requirement

Installation

Without Docker & Docker Compose
  1. Clone the repository.
git clone github.com/rl404/akatsuki
  1. Rename .env.sample to .env and modify the values according to your setup.
  2. Create the database according to your .env.
  3. Migrate the tables.
make migrate
  1. Run. You need at least 2 consoles/terminals.
# Run the API.
make

# Run the consumer.
make consumer
  1. localhost:45001 is ready (port may varies depend on your .env).
Other commands
# Update old anime data.
make cron-update

# Fill missing anime data.
make cron-fill
With Docker & Docker Compose
  1. Clone the repository.
git clone github.com/rl404/akatsuki
  1. Rename .env.sample to .env and modify the values according to your setup.
  2. Create the database according to your .env.
  3. Get docker image.
# Pull existing image.
docker pull rl404/akatsuki

# Or build your own.
make docker-build
  1. Migrate the tables.
make docker-migrate
  1. Run the container. You need at least 2 consoles/terminals.
# Run the API.
make docker-api

# Run the consumer.
make docker-consumer
  1. localhost:45001 is ready (port may varies depend on your .env).
Other commands
# Update old anime data.
make docker-cron-update

# Fill missing anime data.
make docker-cron-fill

# Stop running containers.
make docker-stop

Environment Variables

Env Default Description
AKATSUKI_APP_ENV dev Environment type (dev/prod).
AKATSUKI_HTTP_PORT 45001 HTTP server port.
AKATSUKI_HTTP_READ_TIMEOUT 5s HTTP read timeout.
AKATSUKI_HTTP_WRITE_TIMEOUT 5s HTTP write timeout.
AKATSUKI_HTTP_GRACEFUL_TIMEOUT 10s HTTP gracefull timeout.
AKATSUKI_GRPC_PORT 46001 GRPC server port.
AKATSUKI_GRPC_TIMEOUT 10s GRPC timeout.
AKATSUKI_CACHE_DIALECT inmemory Cache type (nocache/redis/inmemory/memcache)
AKATSUKI_CACHE_ADDRESS Cache address.
AKATSUKI_CACHE_PASSWORD Cache password.
AKATSUKI_CACHE_TIME 24h Cache time.
AKATSUKI_DB_DIALECT mysql Database type (mysql/postgresql/sqlite/sqlserver/clickhouse)
AKATSUKI_DB_ADDRESS localhost:3306 Database address with port.
AKATSUKI_DB_NAME akatsuki Database name.
AKATSUKI_DB_USER Database username.
AKATSUKI_DB_PASSWORD Database password.
AKATSUKI_DB_MAX_CONN_OPEN 10 Max open database connection.
AKATSUKI_DB_MAX_CONN_IDLE 10 Max idle database connection.
AKATSUKI_DB_MAX_CONN_LIFETIME 1m Max database connection lifetime.
AKATSUKI_PUBSUB_DIALECT rabbitmq Pubsub type (nsq/rabbitmq/redis/google)
AKATSUKI_PUBSUB_ADDRESS Pubsub address (if you are using google, this will be your google project id).
AKATSUKI_PUBSUB_PASSWORD Pubsub password (if you are using google, this will be the content of your google service account json).
AKATSUKI_MAL_CLIENT_ID MyAnimeList client id.
AKATSUKI_CRON_UPDATE_LIMIT 10 Anime count limit when updating old data.
AKATSUKI_CRON_FILL_LIMIT 30 Anime count limit when filling missing anime data.
AKATSUKI_CRON_RELEASING_AGE 1 Age of old releasing/airing anime data (in days).
AKATSUKI_CRON_FINISHED_AGE 30 Age of old finished anime data (in days).
AKATSUKI_CRON_NOT_YET_AGE 7 Age of old not yet released/aired anime (in days).

Trivia

Akatsuki's name is taken from japanese destroyer with her sisters (Inazuma, Hibiki, Ikazuchi). Also, exists in Kantai Collection games and anime.

Disclaimer

Akatsuki is meant for educational purpose and personal usage only. Please use it responsibly according to MyAnimeList API License and Developer Agreement.

All data belong to their respective copyrights owners, akatsuki does not have any affiliation with content providers.

License

MIT License

Copyright (c) 2022 Axel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL