Code Monkey home page Code Monkey logo

logtowa-api's Introduction

LogTowa Backend

Quality Gate Status Maintainability Rating Security Rating Vulnerabilities Bugs Duplicated Lines (%)

This is the LogTowa backend. It receives the log messages and provides the API for the frontend.

Installation

Docker

# docker-compose.yml
version: '3.9'

services:
  db:
    container_name: logtowa-db
    image: post
    restart: always
    ports:
      - '5432:5432'
    volumes:
      - ./data:/var/lib/postgresql/data/pgdata
    environment:
      POSTGRES_USER: root
      POSTGRES_PASSWORD: secret
      POSTGRES_DB: logtowa
      PGDATA: /var/lib/postgresql/data/pgdata

  logtowa-api:
    container_name: logtowa-api
    image: tobiaswaelde/logtowa-app:latest
    restart: always
    ports:
      - '3001:3001'
    environment:
      PORT: 3001 # optional
      LOG_LEVEL: warn # optional
      DB_HOST: db
      DB_PORT: 5432
      DB_NAME: logtowa
      DB_USERNAME: root
      DB_PASSWORD: secret
      DB_SECURE: true # optional
      DB_SYNC: false # optional
      SOCKET_TOKEN: secret
      AUTH_TOKEN: secret
      RETENTION_ENABLED: true # optional
      RETENTION_CRON: '0 0 * * *' # optional

Environment

Variable Description Required Default Value
PORT The API port no 3001
LOG_LEVEL Level for console logs no warn
DB_HOST Host of the database yes
DB_PORT Port of the database yes 5432
DB_NAME Name of the database yes logtowa
DB_USERNAME User yes
DB_PASSWORD Password yes
DB_SECURE Flag if database connection is secure no true
DB_SYNC Flag if database should be synced with the models no false
SOCKET_TOKEN Token to authenticate socket connections. Used by the winston transport. yes
AUTH_TOKEN Token to authenticate API requests. Used by the frontend. yes
RETENTION_ENABLED Flag if log retention is enabled no true
RETENTION_CRON CRON schedule for log retention no '0 0 * * *'

logtowa-api's People

Contributors

tobiaswaelde avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.