Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maelvls/foncia
Regroupe les facture et ordres de services en une seule page. Utile pour les membres du conseil syndical d'une copropriété Foncia.
https://github.com/maelvls/foncia
Last synced: 26 days ago
JSON representation
Regroupe les facture et ordres de services en une seule page. Utile pour les membres du conseil syndical d'une copropriété Foncia.
- Host: GitHub
- URL: https://github.com/maelvls/foncia
- Owner: maelvls
- Created: 2024-03-27T16:21:56.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T18:04:29.000Z (about 2 months ago)
- Last Synced: 2024-09-18T10:10:00.355Z (about 2 months ago)
- Language: Go
- Homepage:
- Size: 239 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The `foncia` CLI
The `foncia` CLI lets you list all "missionRepairs" and "missionIncidents". It
also lets you create a server that notifies you using ntfy.sh when a new
"missionIncident" or "missionRepair" is created. Example:![suivi-foncia](https://github.com/user-attachments/assets/a7cfef68-5432-4756-9244-9c866e43a298)
I've created this for two reasons:
1. I wanted to be aware of anything happening in my building, preferably in
real-time on my phone.
2. I found that the `description` field of "missionIncidents" and
"missionRepairs" had disappeared since the migration from the old myFoncia
website to the new "fonciamillenium" website, and I found that I could access
that field using the GraphQL API.## Deploy
```bash
KO_DOCKER_REPO=ghcr.io/maelvls/foncia KO_DEFAULTBASEIMAGE=alpine \
ko build . --bare --tarball /tmp/out.tar --push=false
ssh synology /usr/local/bin/docker load /dev/null 2>/dev/null && docker rm -f foncia || true
docker run -d --restart=always --name foncia -p 8080:8080 \
-v $HOME/foncia.sqlite:/foncia.sqlite \
-v $HOME/foncia_invoices:/invoices \
-v $HOME/foncia-header.html:/foncia-header.html \
-v $HOME/foncia_invoices:/invoices \
-e FONCIA_PASSWORD=REDACTED \
-e FONCIA_USERNAME=REDACTED \
ghcr.io/maelvls/foncia:latest \
--debug \
--db /foncia.sqlite \
--ntfy-topic REDACTED \
--basepath "/foncia" \
--baseurl https://suivi-foncia \
--header-file /foncia-header.html \
serve
```### Who?
```sh
ssh synology /usr/local/bin/docker logs caddy 2>&1 | grep '^{' | jq --slurp '.[]|select(.logger=="security")|"\(.ts|strftime("%Y-%m-%d %H:%M:%S"))\t\(.msg)\t\(.user.email)"' -r | grep -vE 'successfully configured OAuth 2.0|provisioned app instance|provisioning app instance' | uniq
ssh synology /usr/local/bin/docker logs caddy 2>&1 >/dev/null --follow | grep '"logger":"security"'
docker logs caddy --follow 2>&1 | grep '^{' | jq 'select(.logger == "security")'
```