Development

This page owns the local developer workflow for the multi-module repository.

Prerequisites

  • Docker with docker compose
  • sops
  • an AGE private key available to sops, usually through SOPS_AGE_KEY_FILE or ~/.config/sops/age/keys.txt

Local Secret Workflow

The source of truth is:

  • secrets/local/ab-ticket-bot-jobs.env
  • secrets/local/ab-ticket-bot-docs.env

Materialized runtime files are:

  • ab-ticket-bot-jobs/.env.local
  • ab-ticket-bot-docs/.env.local

Before first use, replace the placeholder AGE recipient in repo-root .sops.yaml, then create and encrypt the two local env files with sops.

Start

Start all modules:

./scripts/start.sh

Start only the jobs module:

./ab-ticket-bot-jobs/scripts/ab-ticket-bot-jobs-start.sh

Start only the docs module:

./ab-ticket-bot-docs/scripts/ab-ticket-bot-docs-start.sh

After local start:

  • docs site is served from http://127.0.0.1:18081/
  • jobs module has no HTTP endpoint; observe it through logs and persisted CSV files

Stop

Stop all modules:

./scripts/stop.sh

Deploy

Deploy both modules to the default server:

./scripts/deploy.sh

Override the host:

./scripts/deploy.sh mathbox.90.cz
./scripts/deploy.sh agent@mathbox.90.cz

The deploy workflow materializes .env.server from secrets/prod/<module>.env, uploads each module directory, runs the module-local deploy script on the target host, and then removes the local plaintext .env.server.

Logs and Runtime Data

  • jobs logs: ab-ticket-bot-jobs/logs/ab-ticket-bot-jobs.log
  • docs logs: ab-ticket-bot-docs/logs/ab-ticket-bot-docs.log
  • jobs runtime data: ab-ticket-bot-jobs/data/

Tail the jobs log:

tail -f ab-ticket-bot-jobs/logs/ab-ticket-bot-jobs.log

Jira Helper Scripts

List recent Jira issues:

./ab-ticket-bot-jobs/scripts/list_recent_jira_tickets.py --limit 30

Create a Jira issue manually:

./ab-ticket-bot-jobs/scripts/create_jira_ticket.py \
  --project-key ESH \
  --summary "Test ticket" \
  --description "Popis ticketu"