doorman/README.md

54 lines
1.3 KiB
Markdown

# doorman
To install dependencies:
```bash
bun install
```
To run:
```bash
bun run index.ts
```
This project was created using `bun init` in bun v1.0.3. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
## Deployments
They are configured to happen in gitea actions for CI/CD. If you need to deploy manually, it should be possible as long as you source the requisite envs first.
## to deploy Doorman API / UI
```bash
bun run deploy-serverless
```
## to deploy Doorman Buzzer client
```bash
bun run deploy-buzzer-client
```
## homeassistant integration poller
in configuration.yaml
```
switch:
- platform: rest
name: Doorman
icon: mdi:door-closed-lock
state_resource: https://doorman.chromart.cc/api/door/info?door=buzzer
resource: https://doorman.chromart.cc/api/door/auth?door=buzzer&key=1991
is_on_template: "{{ value_json.status == 'OPEN' }}"
```
## .env.twiliotemplate
This file is used for twilio Deployments in github actions. In short, it specifies all the env values that are supposed to be deployed with the Function.
For any value that is specified, it uses that value.
For any value that is in the file but not specified (= nothing), it would be loaded from the execution environment (as a Gitea secret). If the env var is not in the environment passed in, then the deployment would fail.