Skip to content

Reporting service for ezMESURE/ezCOUNTER

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENCE.txt
Unknown
LICENSE.txt
Notifications You must be signed in to change notification settings

ezpaarse-project/ezreeport

Repository files navigation

ezReeport

Reporting service for ezMESURE/ezCOUNTER

Prerequisites

Installation

git clone https://github.com/ezpaarse-project/ezreeport.git
pnpm i

Main branches

  • master:
    • Should be the version used on prod (vp)
  • rc/*:
    • Should be the version used on integ (vi)
    • Versions are suffixed by -rc.*
  • dev:
    • Should be the version used on dev (vd)
    • Versions are suffixed by -beta.*

Workflow

Workflow used here is the same as Git Flow :

  • To make new changes : create a feature/* branch
  • Once feature is completed, make a Pull Request from your branch to the dev branch
  • Once a new version is ready, create a new rc/* branch and make a (draft) PR to the master branch
  • Once the new version is deployed, merge the PR

Services

  • src/services/report: (ezreeport-report)
    • Generate PDF reports with HTTP API. Also run cronjob to generate reports
  • src/services/mail: (ezreeport-mail)
    • Handle email management

Packages

  • src/sdk (ezreeport-sdk-js)
    • SDK for ezReeport API
  • src/vue (ezreeport-vue)
    • Vue components that use SDK for displaying info
    • It also contains an example with Nuxt at src/vue/example (it's not part of the workspace because of webpack issues)

Start

Prod

source ezreeport.env.sh
docker compose -f docker-compose.yml pull
docker compose -f docker-compose.migrate.yml up -d
docker compose -f docker-compose.yml up -d

Dev

source ezreeport.env.sh
docker compose -f docker-compose.yml -f docker-compose.debug.yml pull
docker compose -f docker-compose.migrate.yml up -d
docker compose -f docker-compose.yml -f docker-compose.debug.yml up -d

Test

Located at tests

npm test

Publish

# Test, and build a first time to test

# Generate changelogs, etc. as it will bump version (called tag later)
pnpm run publish

# Build and push report + mail on github registry
docker build --target $SERVICE -t ezreeport/$SERVICE:$TAG .
docker tag ezreeport/$SERVICE:$TAG ghcr.io/ezpaarse-project/ezreeport-$SERVICE:$TAG
docket push ghcr.io/ezpaarse-project/ezreeport-$SERVICE:$TAG

# Build and push sdk -> vue on npm
pnpm --filter $PACKAGE run build
pnpm --filter $PACKAGE publish --access public