cattaz icon indicating copy to clipboard operation
cattaz copied to clipboard

Where does Cattaz store persistent data? [Docker]

Open kawaii opened this issue 7 years ago • 5 comments

Hello, in the Docker container, where does Cattaz store any created documents? Is there a single file path I can just create a volume bind mount to in order to persist the data between container recreation?

kawaii avatar Mar 29 '18 12:03 kawaii

Also, is there an environment variable to allow me to change the websocket port used by the app? In the docker-compose.yml file I can easily change the websocket listener like so:

ports:
  - "17011:1234"
  - "80:8080"

However the Cattaz web application seems hardcoded to check port 1234 for the websocket. :)

kawaii avatar Mar 29 '18 13:03 kawaii

Hi kawaii,

where does Cattaz store any created documents?

If you use master branch, Cattaz does not persist documents for now. If you use leveldb branch (#6), Cattaz stores documents at ./y-leveldb-databases/.

is there an environment variable to allow me to change the websocket port used by the app?

Currently not. It is a good idea to make ports configurable. Would you like to make a PR or shall I do it for you?

ohtake avatar Mar 30 '18 00:03 ohtake

Currently not. It is a good idea to make ports configurable. Would you like to make a PR or shall I do it for you?

Hmm, I assume that it is simply a matter of changing src/Main.jsx#10 and src/AppEnabledWikiEditorCodeMirror.jsx#L81 to use an environment variable such as process.env.PORT, but I'm not a JavaScript expert, so maybe it is best if you do it. :slightly_smiling_face:

kawaii avatar Apr 04 '18 12:04 kawaii

Port numbers are now configurable. You can find documentation at http://cattaz.io/build/#/doc/usage. Could you try it?

ohtake avatar Apr 06 '18 00:04 ohtake

@ohtake thank you! I have tested it and the fuctionality works as intended. :slightly_smiling_face:

kawaii avatar Apr 12 '18 11:04 kawaii