refactor: rename remaining mikrotik references to tod across CI, helm, frontend, and observability
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
@@ -84,7 +84,7 @@ jobs:
|
||||
postgres:
|
||||
image: timescale/timescaledb:latest-pg17
|
||||
env:
|
||||
POSTGRES_DB: mikrotik_test
|
||||
POSTGRES_DB: tod_test
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
@@ -117,11 +117,11 @@ jobs:
|
||||
|
||||
env:
|
||||
ENVIRONMENT: dev
|
||||
DATABASE_URL: "postgresql+asyncpg://postgres:postgres@localhost:5432/mikrotik_test"
|
||||
SYNC_DATABASE_URL: "postgresql+psycopg2://postgres:postgres@localhost:5432/mikrotik_test"
|
||||
APP_USER_DATABASE_URL: "postgresql+asyncpg://app_user:app_password@localhost:5432/mikrotik_test"
|
||||
TEST_DATABASE_URL: "postgresql+asyncpg://postgres:postgres@localhost:5432/mikrotik_test"
|
||||
TEST_APP_USER_DATABASE_URL: "postgresql+asyncpg://app_user:app_password@localhost:5432/mikrotik_test"
|
||||
DATABASE_URL: "postgresql+asyncpg://postgres:postgres@localhost:5432/tod_test"
|
||||
SYNC_DATABASE_URL: "postgresql+psycopg2://postgres:postgres@localhost:5432/tod_test"
|
||||
APP_USER_DATABASE_URL: "postgresql+asyncpg://app_user:app_password@localhost:5432/tod_test"
|
||||
TEST_DATABASE_URL: "postgresql+asyncpg://postgres:postgres@localhost:5432/tod_test"
|
||||
TEST_APP_USER_DATABASE_URL: "postgresql+asyncpg://app_user:app_password@localhost:5432/tod_test"
|
||||
CREDENTIAL_ENCRYPTION_KEY: "LLLjnfBZTSycvL2U07HDSxUeTtLxb9cZzryQl0R9E4w="
|
||||
JWT_SECRET_KEY: "change-this-in-production-use-a-long-random-string"
|
||||
REDIS_URL: "redis://localhost:6379/0"
|
||||
@@ -149,16 +149,16 @@ jobs:
|
||||
PGPASSWORD: postgres
|
||||
run: |
|
||||
# Create app_user role for RLS-enforced connections
|
||||
psql -h localhost -U postgres -d mikrotik_test -c "
|
||||
psql -h localhost -U postgres -d tod_test -c "
|
||||
CREATE ROLE app_user WITH LOGIN PASSWORD 'app_password' NOSUPERUSER NOCREATEDB NOCREATEROLE;
|
||||
GRANT CONNECT ON DATABASE mikrotik_test TO app_user;
|
||||
GRANT CONNECT ON DATABASE tod_test TO app_user;
|
||||
GRANT USAGE ON SCHEMA public TO app_user;
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO app_user;
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO app_user;
|
||||
" || true
|
||||
|
||||
# Create poller_user role
|
||||
psql -h localhost -U postgres -d mikrotik_test -c "
|
||||
psql -h localhost -U postgres -d tod_test -c "
|
||||
DO \$\$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'poller_user') THEN
|
||||
@@ -166,7 +166,7 @@ jobs:
|
||||
END IF;
|
||||
END
|
||||
\$\$;
|
||||
GRANT CONNECT ON DATABASE mikrotik_test TO poller_user;
|
||||
GRANT CONNECT ON DATABASE tod_test TO poller_user;
|
||||
GRANT USAGE ON SCHEMA public TO poller_user;
|
||||
" || true
|
||||
|
||||
@@ -231,36 +231,36 @@ jobs:
|
||||
# Running them in parallel would exceed typical runner memory.
|
||||
|
||||
- name: Build API image
|
||||
run: docker build -f infrastructure/docker/Dockerfile.api -t mikrotik-api:ci .
|
||||
run: docker build -f infrastructure/docker/Dockerfile.api -t tod-api:ci .
|
||||
|
||||
- name: Scan API image
|
||||
uses: aquasecurity/trivy-action@0.33.1
|
||||
with:
|
||||
image-ref: "mikrotik-api:ci"
|
||||
image-ref: "tod-api:ci"
|
||||
format: "table"
|
||||
exit-code: "1"
|
||||
severity: "HIGH,CRITICAL"
|
||||
trivyignores: ".trivyignore"
|
||||
|
||||
- name: Build Poller image
|
||||
run: docker build -f poller/Dockerfile -t mikrotik-poller:ci ./poller
|
||||
run: docker build -f poller/Dockerfile -t tod-poller:ci ./poller
|
||||
|
||||
- name: Scan Poller image
|
||||
uses: aquasecurity/trivy-action@0.33.1
|
||||
with:
|
||||
image-ref: "mikrotik-poller:ci"
|
||||
image-ref: "tod-poller:ci"
|
||||
format: "table"
|
||||
exit-code: "1"
|
||||
severity: "HIGH,CRITICAL"
|
||||
trivyignores: ".trivyignore"
|
||||
|
||||
- name: Build Frontend image
|
||||
run: docker build -f infrastructure/docker/Dockerfile.frontend -t mikrotik-frontend:ci .
|
||||
run: docker build -f infrastructure/docker/Dockerfile.frontend -t tod-frontend:ci .
|
||||
|
||||
- name: Scan Frontend image
|
||||
uses: aquasecurity/trivy-action@0.33.1
|
||||
with:
|
||||
image-ref: "mikrotik-frontend:ci"
|
||||
image-ref: "tod-frontend:ci"
|
||||
format: "table"
|
||||
exit-code: "1"
|
||||
severity: "HIGH,CRITICAL"
|
||||
|
||||
12
.github/workflows/security-scan.yml
vendored
12
.github/workflows/security-scan.yml
vendored
@@ -20,36 +20,36 @@ jobs:
|
||||
# Add base-image CVEs to .trivyignore with justification if needed.
|
||||
|
||||
- name: Build API image
|
||||
run: docker build -f infrastructure/docker/Dockerfile.api -t mikrotik-api:scan .
|
||||
run: docker build -f infrastructure/docker/Dockerfile.api -t tod-api:scan .
|
||||
|
||||
- name: Scan API image
|
||||
uses: aquasecurity/trivy-action@0.33.1
|
||||
with:
|
||||
image-ref: "mikrotik-api:scan"
|
||||
image-ref: "tod-api:scan"
|
||||
format: "table"
|
||||
exit-code: "1"
|
||||
severity: "HIGH,CRITICAL"
|
||||
trivyignores: ".trivyignore"
|
||||
|
||||
- name: Build Poller image
|
||||
run: docker build -f poller/Dockerfile -t mikrotik-poller:scan ./poller
|
||||
run: docker build -f poller/Dockerfile -t tod-poller:scan ./poller
|
||||
|
||||
- name: Scan Poller image
|
||||
uses: aquasecurity/trivy-action@0.33.1
|
||||
with:
|
||||
image-ref: "mikrotik-poller:scan"
|
||||
image-ref: "tod-poller:scan"
|
||||
format: "table"
|
||||
exit-code: "1"
|
||||
severity: "HIGH,CRITICAL"
|
||||
trivyignores: ".trivyignore"
|
||||
|
||||
- name: Build Frontend image
|
||||
run: docker build -f infrastructure/docker/Dockerfile.frontend -t mikrotik-frontend:scan .
|
||||
run: docker build -f infrastructure/docker/Dockerfile.frontend -t tod-frontend:scan .
|
||||
|
||||
- name: Scan Frontend image
|
||||
uses: aquasecurity/trivy-action@0.33.1
|
||||
with:
|
||||
image-ref: "mikrotik-frontend:scan"
|
||||
image-ref: "tod-frontend:scan"
|
||||
format: "table"
|
||||
exit-code: "1"
|
||||
severity: "HIGH,CRITICAL"
|
||||
|
||||
@@ -24,7 +24,7 @@ errorlog = "-"
|
||||
loglevel = os.getenv("LOG_LEVEL", "info")
|
||||
|
||||
# Process naming
|
||||
proc_name = "mikrotik-api"
|
||||
proc_name = "tod-api"
|
||||
|
||||
# Preload application for faster worker spawning (shared memory for code)
|
||||
preload_app = True
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import { useState, useCallback } from 'react'
|
||||
|
||||
const STORAGE_KEY = 'mikrotik-simple-mode'
|
||||
const STORAGE_KEY = 'tod-simple-mode'
|
||||
|
||||
type ConfigMode = 'simple' | 'standard'
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export const useUIStore = create<UIState>()(
|
||||
},
|
||||
}),
|
||||
{
|
||||
name: 'mikrotik-ui-state',
|
||||
name: 'tod-ui-state',
|
||||
partialize: (state) => ({
|
||||
sidebarCollapsed: state.sidebarCollapsed,
|
||||
theme: state.theme,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const THEME_STORAGE_KEY = 'mikrotik-ui-state'
|
||||
const THEME_STORAGE_KEY = 'tod-ui-state'
|
||||
|
||||
export type Theme = 'dark' | 'light'
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ postgres:
|
||||
port: 5432
|
||||
|
||||
auth:
|
||||
database: mikrotik
|
||||
database: tod
|
||||
username: postgres
|
||||
# password is sourced from secrets.dbPassword
|
||||
appUsername: app_user
|
||||
@@ -105,7 +105,7 @@ postgres:
|
||||
memory: 2Gi
|
||||
|
||||
# External PostgreSQL URL (used when postgres.enabled=false)
|
||||
# externalUrl: "postgresql+asyncpg://user:pass@host:5432/mikrotik"
|
||||
# externalUrl: "postgresql+asyncpg://user:pass@host:5432/tod"
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Redis
|
||||
@@ -186,7 +186,7 @@ ingress:
|
||||
# annotations:
|
||||
# cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
|
||||
# host: mikrotik.example.com — set this in your deployment
|
||||
# host: tod.example.com — set this in your deployment
|
||||
host: ""
|
||||
|
||||
tls:
|
||||
|
||||
@@ -3,14 +3,14 @@ global:
|
||||
evaluation_interval: 15s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'mikrotik-api'
|
||||
- job_name: 'tod-api'
|
||||
metrics_path: /metrics
|
||||
static_configs:
|
||||
- targets: ['api:8000']
|
||||
labels:
|
||||
service: 'api'
|
||||
|
||||
- job_name: 'mikrotik-poller'
|
||||
- job_name: 'tod-poller'
|
||||
metrics_path: /metrics
|
||||
static_configs:
|
||||
- targets: ['poller:9091']
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
-- The Other Dude v9.0 — Demo Seed Data (Big Lebowski themed)
|
||||
-- =============================================================================
|
||||
-- Creates two tenants with realistic MikroTik device data for screenshots.
|
||||
-- Run against a fresh database after migrations: psql -U postgres -d mikrotik -f seed-demo-data.sql
|
||||
-- Run against a fresh database after migrations: psql -U postgres -d tod -f seed-demo-data.sql
|
||||
-- Idempotent: uses ON CONFLICT DO NOTHING.
|
||||
-- =============================================================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user