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