Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack in documentation #19

Closed
petrk94 opened this issue Mar 18, 2020 · 6 comments
Closed

Lack in documentation #19

petrk94 opened this issue Mar 18, 2020 · 6 comments

Comments

@petrk94
Copy link

petrk94 commented Mar 18, 2020

Hello,
I really like it, but I facing the problem, that there is no installation guide in the readme.
How does the data get stored? How to delete the whiteboards once created?
Is there an API can access to make changes.
There is just a docker file, but no explanation what it does or how to work with it etc.

Hope you can give me some more information, if you dont have time to update the manual, I can write a short text which can be improved, so at least its saved here.
Thanks

@lovasoa
Copy link
Owner

lovasoa commented Mar 18, 2020

Oh, yes, I would love a contribution to the documentation !

Here are the answers to your questions:

How does the data get stored?

The data is stored in json files (one file per board) in the server-data directory

How to delete the whiteboards once created ?

This is currently not possible, on purpose: since there is no user permissions, we don't want a single person to be able to delete the whole whiteboard.
If you have access to the server, you can simply delete the board's json file in server-data/.

Is there an API can access to make changes ?

The communication protocol is socket.io, it is quite simple, but I haven't documented it. The messages are simple json messages in the form :

{
    "board": "board name",
    "data": ...
}

And the data is specific to each tool. For instance, for a rectangle, it is :

{
    "type": "rect",
    "id": "unique id",
    "color": "#71AF32",
    "size": 3,
    "opacity": 0.3,
    "x": x,
    "y": y,
    "x2": x,
    "y2": y
}

You can find the specific format used in each tool directory.

If you have more questions, let me know ! If you want to contribute, you are very welcome !

@fineman
Copy link

fineman commented Mar 21, 2020

So am I right in thinking to deploy this to our own server we should clone the rep, then build a docker image and deploy that to a container? Linux presumably? Happy to contribute some notes on how to do that if I get a few pointers - new to Docker.

@lovasoa
Copy link
Owner

lovasoa commented Mar 21, 2020

I should be really simple, when using docker compose.

Clone the repository

git clone git@github.com:lovasoa/whitebophir.git
cd whitebophir

Running the code in a container (safer)

Choose where to persist the data (optional)

You can edit docker-compose.ymlto choose where you want to persist the data

    volumes:
      - /home/ophir/whitebophir/server-data:/opt/app/server-data

Here, I chose to persist the data in /home/ophir/whitebophir/server-data (the directory where I cloned the repo)

Start the service

sudo docker-compose up

This will start wbo on port 80. (You can change the port number in docker-compose.yaml if you want)

@lovasoa
Copy link
Owner

lovasoa commented Mar 21, 2020

Running the code without a container

You can alternatively run the code with node directly, without docker :

npm install
npm start

If you do that, the code is running directly on your machine, without any isolation from the other services. Make sure you do not run another sensitive service on the same host.

@lovasoa
Copy link
Owner

lovasoa commented Mar 21, 2020

I also pushed the WBO docker image on docker hub for easier usage:
https://hub.docker.com/repository/docker/lovasoa/wbo

@lovasoa
Copy link
Owner

lovasoa commented Mar 21, 2020

@petrk94 I would love if you could give feedback on the documentation I wrote in the README. If you see possible improvements, do not hesitate to suggest them !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants