AdamSulek / timelogs

0 stars 1 forks source link

timelogs

Timelogs is a combination of a technical kit with Nginx, FastApi, dbt and Postgres database.
The application tracks messages on Slack with crontab script, transform and validate data and saves timelog information to a database.
The application automatically recognizes the information stored in the Slack message based on NLP (Natural Language Processing). Moreover, application recognize add me message from the user and add the user to database.
Timelogs works also as REST API independently and provides creating and removing the user/timelogs with GUI interface.

Nginx Unit configuration

The default Nginx Unit configuration file can be found at fastapi/config.json instead of nginx.conf file used in nginx. It's set to run the site for local development at http://localhost:8000.

Postgres configuration

Slack Channel Authorization

To get access to Slack messages put your SLACK_TOKEN into token.json file in base directory. The file should be a dictionary: {"SLACK_TOKEN": 'token secret'}

Running docker container

To run docker container build the container image from base folder with command:
docker build -t python/python:3.9-buster . -f docker/Dockerfile
docker build -t nginx/unit:1.22.0-python3.9 . -f docker/fastapi/Dockerfile
and than run container with docker-compose file from docker folder with command:
docker-compose up -d

pgAdmin

To see changes in database use server http://localhost:5050. To log in to pgAdmin server use your email and password authentication defined in docker-compose. In pgAdmin you can also run SQL codex.

Metabase

To see your access to metabase use server http://localhost:3000.