From e3155922af1297e32a643c538d276b2de3cf7b30 Mon Sep 17 00:00:00 2001 From: Blallo Date: Thu, 8 Aug 2019 16:05:59 +0200 Subject: [PATCH] Updated README. --- README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4b7fcae..71fac42 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,62 @@ Features * Login/Logout * Check in/Check out +* web ui + + +Develop +------- + + +To allow local development you either need a configuration file named +`.botz.yaml` in the root of the project with something like this: + +``` +--- +base_uri: "" +debug: true +headless: true +log: + level: DEBUG + syslog: false +http: + bind_addr: + - "127.0.0.1" + port: 3003 + cookie_secure: false + cors_allow: "http://localhost:3000" +``` + +Read the docstring in `api/conf.py` to understand the menaning of the +various parameters. + +*Do not `pip install -e .`*. It will miss the geckodriver download step. +Take a look at the provided `Dockerfile`. + +You can either run it: + +``` +$ docker build -t botz:latest . +$ docker run -v $PWD:/app -p "3003:3003" botz +``` + +and find a working app at `http://localhost:3003`. +Or you can `python setup.py bdist_wheel && python setup.py develop`. +You will need: + +- `python >= 3.7` +- `yarn` (`npm` support coming soon...) + +If you want to develop the ui, you can also serve it via yarn (as it +supports hot reload): + +``` +$ cd bot.z_web +$ yarn start +``` + +You will find a working ui at `localhost:3000` (but you need the last two +lines of the previous example config file). Install @@ -35,5 +91,5 @@ TODO - [x] Check in/out - [ ] systemd {unit, timer} -- [ ] APIs +- [x] APIs - [ ] Mailer