cypht-org / cypht-docker

Legacy Docker image setup files to run Cypht
GNU General Public License v2.0
39 stars 24 forks source link

sqlite support #32

Open jonocodes opened 4 months ago

jonocodes commented 4 months ago

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.

wangxiaoerYah commented 4 months ago

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

jonocodes commented 4 months ago

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.

wangxiaoerYah commented 4 months ago

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.

jonocodes commented 4 months ago

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 commented 4 months ago

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

wangxiaoerYah commented 4 months ago

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