synckor

module
v0.0.0-...-71b0ef4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT

README

SyncKor

A sync server for the e-reader app KOReader.
Made to be a drop-in replacement for the official KOReader sync server.

Demo

https://github.com/user-attachments/assets/87db85a1-c015-4e63-985c-98e079071dec

Quick Start

  • The project has an official Docker image published on github container registry.
  • The repository is located HERE
  • The environment variables that are needed can be found below in the Environment Variables section.
  • For setting up the s3 bucket or s3 compatible storage, please reference the detailed guide in the litestream documentation

Getting Started

Dependencies
How to Setup the Application (Local)
  • Local setup doesn't include litestream
  1. Setup a local MinIO object storage.
docker run -p 9000:9000 -p 9001:9001 minio/minio server /data --console-address ":9001"
  1. Follow the guide on litestream to create the bucket in the MinIO object storage.
  2. Run the make command to start the application.
make run
How to Setup the Application (Docker)
  1. Setup a local MinIO object storage.
docker run -p 9000:9000 -p 9001:9001 minio/minio server /data --console-address ":9001"
  1. Follow the guide on litestream to create the bucket in the MinIO object storage.
  2. Use the make command to build the docker image.
make docker-build
  1. Edit the docker-compose.yml file to make sure the environment variables are correct.

  2. Use the make command to run the docker image.

make docker-run
Environment Variables
Key Description Example Note
PORT The port that the server will listen on 8050
REGISTRATION_ENABLED Whether or not registration is enabled true
LITESTREAM_ACCESS_KEY_ID The access key id for the object storage minioadmin The key will be different depending on which object storage you use, check the litestream guides to see the changes
LITESTREAM_SECRET_ACCESS_KEY The secret access key for the object storage minioadmin The key will be different depending on which object storage you use, check the litestream guides to see the changes
REPLICA_URL The url for the object storage s3://synckor-bkt-test.localhost:9000/db.sqlite

License

This project is licensed under the MIT License - see the LICENSE file for details

Directories

Path Synopsis
cmd
migrate command
server command
internal
api
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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