Browse Source

Updated README.

blallo 3 months ago
parent
commit
e3155922af
Signed by: blallo <blallo@autistici.org> GPG Key ID: 0CBE577C9B72DC3F
1 changed files with 57 additions and 1 deletions
  1. 57
    1
      README.md

+ 57
- 1
README.md View File

@@ -13,6 +13,62 @@ Features
13 13
 
14 14
 * Login/Logout
15 15
 * Check in/Check out
16
+* web ui
17
+
18
+
19
+Develop
20
+-------
21
+
22
+
23
+To allow local development you either need a configuration file named
24
+`.botz.yaml` in the root of the project with something like this:
25
+
26
+```
27
+---
28
+base_uri: "<your_target_uri>"
29
+debug: true
30
+headless: true
31
+log:
32
+  level: DEBUG
33
+  syslog: false
34
+http:
35
+  bind_addr:
36
+    - "127.0.0.1"
37
+  port: 3003
38
+  cookie_secure: false
39
+  cors_allow: "http://localhost:3000"
40
+```
41
+
42
+Read the docstring in `api/conf.py` to understand the menaning of the
43
+various parameters.
44
+
45
+*Do not `pip install -e .`*. It will miss the geckodriver download step.
46
+Take a look at the provided `Dockerfile`.
47
+
48
+You can either run it:
49
+
50
+```
51
+$ docker build -t botz:latest .
52
+$ docker run -v $PWD:/app -p "3003:3003" botz
53
+```
54
+
55
+and find a working app at `http://localhost:3003`.
56
+Or you can `python setup.py bdist_wheel && python setup.py develop`.
57
+You will need:
58
+
59
+- `python >= 3.7`
60
+- `yarn` (`npm` support coming soon...)
61
+
62
+If you want to develop the ui, you can also serve it via yarn (as it
63
+supports hot reload):
64
+
65
+```
66
+$ cd bot.z_web
67
+$ yarn start
68
+```
69
+
70
+You will find a working ui at `localhost:3000` (but you need the last two
71
+lines of the previous example config file).
16 72
 
17 73
 
18 74
 Install
@@ -35,5 +91,5 @@ TODO
35 91
 
36 92
 - [x] Check in/out
37 93
 - [ ] systemd {unit, timer}
38
-- [ ] APIs
94
+- [x] APIs
39 95
 - [ ] Mailer

Loading…
Cancel
Save