ankicommunity / anki-sync-server-rs

A personal custom Anki sync server,aim to provide an easier way for deployment
GNU Affero General Public License v3.0
180 stars 27 forks source link

When modifying the save location of "root_dir", other files are also stored in "/app" #51

Closed aaro-n closed 1 year ago

aaro-n commented 1 year ago

Encounter problems

Modify root_dir to "root_dir = "/home/anki/data" ", "auth.db, session.db" have been saved in "/home/anki/data", and create a user, but when logging in, it prompts "Authentication failed for nonexistent user", the user just created has been checked with "ankisyncd user --list", and the "root_dir" setting is restored, and it can be used normally.

idea

Ability to change the default storage location for data

"/app" stored file or directory

# ls /app
ankisyncd.toml  auth.db  collections  session.db
# 
dobefore commented 1 year ago

Thanks for taking the issue into my attention! It seems that you are using the docker version.

If you set custom path to hold your data,then you shouldn't run server inside the docker,but run outside the docker. If I understand incorrectly,please provide more details like step by step info,I am all ears.

aaro-n commented 1 year ago

is running in Docker

dobefore commented 1 year ago

Hava you tried the commad line argument --config path/to/ankisyncd.toml ?

is running in Docker

I don;t know its precise meaning. there is a default store path /app used when running docker command. Maybe you can extract the binary from the docker container and run it on your host. And test whether changing path works as expected or not .

Edir: I would wonder what is the point by changing the store path right in the docker. As far As I know (though I am not familiar with docker),you can map the docker path to your host real path and there is no need to indrectly manipulate store path in the docker.Would you mind giving me your use cases?

aaro-n commented 1 year ago

Just wanted to give feedback. Now anki-sync-server-rs is running fine, I thought deploying on vps and running with Docker, the configuration is the same.

dobefore commented 1 year ago

Thanks for the feedback,I'll consider this.However,this is the feature which most poeple will not touch.I'll close the question and reopen until someone notice this.