[Feature Request] Docker container for self-hosting
I would like to self-host this app on my home server using a docker container. Ideally the docker container would accept a mapped volume to the location of all the mokuro bundles, and allow the user to choose one.
I would love to see this as well - or at least instructions on how to deploy this app in a production environment
+1 For this, I have Casaos installed, and it would be great if we could do this.
@dlsf you may want to check this repo github.com/nanoskript/manga-ocr-docker, and under the hood mokuro use manga-ocr too
That link unfortunately does not help; manga-ocr and mokuro are written in Python and the deployment process is different from for mokuro-reader (Typescript with Svelte). I have yet to figure out how to run this app in anything but preview mode (which isn't recommended for production environments); I didn't even manage to run it in dev mode per the instructions in the README. I appreciate the suggestion, though!
@dlsf Update: yeah I am also stuck, I tried to pull mokuro, and mokuro-reader but mokuro itself depends on another project named comic_text_reader, which is pretty old, (2 years ago) and my phtyon3 keep gets dependency version clash when pulling it's requirement.txt
comic_text_detector > depends on trdg > depends on > arabic_reshaper which not compatible with python3 I also need to rename onnx-simplifer to onnxsim
So for now it is a dependency version hell
Hmm, that's weird, I recently got the latest version of mokuro working on my machine, and I even pushed it as an update to the nix package manager. Maybe your Python version is outdated? The latest version of mokuro also doesn't have a requirements.txt file
I have yet to figure out how to run this app in anything but preview mode
go into this cloned directory and run npm install
followed by npm i -D @sveltejs/[email protected] (version 1.3.1, since this reader uses sveltejs/[email protected], and newer adapter-node versions use newer sveltekit versions)
and in svelte.config.js change the first line
-import adapter from '@sveltejs/adapter-auto';
+import adapter from '@sveltejs/adapter-node';
then you can do npm run build and node build to run mokuro-reader in a production build, note that google drive will not work and the app will hang if you try to use that
Sadly still only the persistent storage of the browser will be used to store the files and just linking a mapped volume onto docker is not possible with more changes to mokuro reader to support a way to read files from the disk, although I would also really like that feature
You can fix Drive by creating your own API key and OAuth client ID on Google Cloud:
- create a new project
- https://console.cloud.google.com/apis/library (enable Google Picker API and Google Drive API)
- https://console.cloud.google.com/apis/credentials create an API Key and an OAuth Client ID for "Web application", you can use the screenshots below as a reference
- fill them in here https://github.com/ZXY101/mokuro-reader/blob/main/src/routes/cloud/%2Bpage.svelte#L11-L12