cypht-docker icon indicating copy to clipboard operation
cypht-docker copied to clipboard

sqlite support

Open jonocodes opened this issue 3 months ago • 6 comments

I'm new to cypht. It appears you can run cypht using sqlite without mysql. But I dont think this setup is supported in docker.

jonocodes avatar Apr 24 '24 15:04 jonocodes

You can try the container image in cypht-org/cypht#975.

wangxiaoerYah avatar Apr 25 '24 04:04 wangxiaoerYah

Thanks! Yes I tried it and after guessing the password was able to get in. By the way, how did you set up the admin account? I cant find it. Also once logged in, I made some changes and saved them. But they did not persist when I logged out and in.

jonocodes avatar Apr 26 '24 00:04 jonocodes

Thanks! Yes I tried it and after guessing the password was able to get in. By the way, how did you set up the admin account? I cant find it. Also once logged in, I made some changes and saved them. But they did not persist when I logged out and in.

The default user is set here. You can pass it via docker environment variables.

docker run -d -e CYPHT_AUTH_USERNAME=user CYPHT_AUTH_PASSWORD=1234.....

If you use sqlite it will create the directory and database here by default.

You should make it persistent. like it. docker run -d -v ~/cypht:/var/lib/hm3...

In general, this docker image is still being updated. After it is merged into the mainline, I will start to improve it and write documents.

wangxiaoerYah avatar Apr 26 '24 02:04 wangxiaoerYah

Thanks! Yes I tried it and after guessing the password was able to get in. By the way, how did you set up the admin account? I cant find it. Also once logged in, I made some changes and saved them. But they did not persist when I logged out and in.

The default user is set here. You can pass it via docker environment variables.

docker run -d -e CYPHT_AUTH_USERNAME=user CYPHT_AUTH_PASSWORD=1234.....

Ah good.

If you use sqlite it will create the directory and database here by default.

You should make it persistent. like it. docker run -d -v ~/cypht:/var/lib/hm3...

My changes are not persisting between logins. I am not restarting the service, just logging out.

In general, this docker image is still being updated. After it is merged into the mainline, I will start to improve it and write documents.

Sounds good. I look forward to the merge.

jonocodes avatar Apr 26 '24 13:04 jonocodes

Where are the credentials for my imap accounts stored? In a blob in the sqlite db?

jonocodes avatar Apr 26 '24 13:04 jonocodes

Where are the credentials for my imap accounts stored? In a blob in the sqlite db?

By default I have set it to USER_CONFIG_TYPE=DB which will save the user settings in the database. You can also change it to file, which will store it in a file. In any case remember to persist your data directory /var/lib/hm3

wangxiaoerYah avatar Apr 26 '24 18:04 wangxiaoerYah