javi-forge 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ci-local/ci-local.sh +20 -8
- package/package.json +1 -1
- package/ai-config/.skillignore +0 -15
- package/ai-config/AUTO_INVOKE.md +0 -300
- package/ai-config/agents/_TEMPLATE.md +0 -93
- package/ai-config/agents/business/api-designer.md +0 -1657
- package/ai-config/agents/business/business-analyst.md +0 -1331
- package/ai-config/agents/business/product-strategist.md +0 -206
- package/ai-config/agents/business/project-manager.md +0 -178
- package/ai-config/agents/business/requirements-analyst.md +0 -1277
- package/ai-config/agents/business/technical-writer.md +0 -1679
- package/ai-config/agents/creative/ux-designer.md +0 -205
- package/ai-config/agents/data-ai/ai-engineer.md +0 -487
- package/ai-config/agents/data-ai/analytics-engineer.md +0 -953
- package/ai-config/agents/data-ai/data-engineer.md +0 -173
- package/ai-config/agents/data-ai/data-scientist.md +0 -672
- package/ai-config/agents/data-ai/mlops-engineer.md +0 -814
- package/ai-config/agents/data-ai/prompt-engineer.md +0 -772
- package/ai-config/agents/development/angular-expert.md +0 -620
- package/ai-config/agents/development/backend-architect.md +0 -795
- package/ai-config/agents/development/database-specialist.md +0 -212
- package/ai-config/agents/development/frontend-specialist.md +0 -686
- package/ai-config/agents/development/fullstack-engineer.md +0 -668
- package/ai-config/agents/development/golang-pro.md +0 -338
- package/ai-config/agents/development/java-enterprise.md +0 -400
- package/ai-config/agents/development/javascript-pro.md +0 -422
- package/ai-config/agents/development/nextjs-pro.md +0 -474
- package/ai-config/agents/development/python-pro.md +0 -570
- package/ai-config/agents/development/react-pro.md +0 -487
- package/ai-config/agents/development/rust-pro.md +0 -246
- package/ai-config/agents/development/spring-boot-4-expert.md +0 -326
- package/ai-config/agents/development/typescript-pro.md +0 -336
- package/ai-config/agents/development/vue-specialist.md +0 -605
- package/ai-config/agents/infrastructure/cloud-architect.md +0 -472
- package/ai-config/agents/infrastructure/deployment-manager.md +0 -358
- package/ai-config/agents/infrastructure/devops-engineer.md +0 -455
- package/ai-config/agents/infrastructure/incident-responder.md +0 -519
- package/ai-config/agents/infrastructure/kubernetes-expert.md +0 -705
- package/ai-config/agents/infrastructure/monitoring-specialist.md +0 -674
- package/ai-config/agents/infrastructure/performance-engineer.md +0 -658
- package/ai-config/agents/orchestrator.md +0 -241
- package/ai-config/agents/quality/accessibility-auditor.md +0 -1204
- package/ai-config/agents/quality/code-reviewer-compact.md +0 -123
- package/ai-config/agents/quality/code-reviewer.md +0 -363
- package/ai-config/agents/quality/dependency-manager.md +0 -743
- package/ai-config/agents/quality/e2e-test-specialist.md +0 -1005
- package/ai-config/agents/quality/performance-tester.md +0 -1086
- package/ai-config/agents/quality/security-auditor.md +0 -133
- package/ai-config/agents/quality/test-engineer.md +0 -453
- package/ai-config/agents/specialists/api-designer.md +0 -87
- package/ai-config/agents/specialists/backend-architect.md +0 -73
- package/ai-config/agents/specialists/code-reviewer.md +0 -77
- package/ai-config/agents/specialists/db-optimizer.md +0 -75
- package/ai-config/agents/specialists/devops-engineer.md +0 -83
- package/ai-config/agents/specialists/documentation-writer.md +0 -78
- package/ai-config/agents/specialists/frontend-developer.md +0 -75
- package/ai-config/agents/specialists/performance-analyst.md +0 -82
- package/ai-config/agents/specialists/refactor-specialist.md +0 -74
- package/ai-config/agents/specialists/security-auditor.md +0 -74
- package/ai-config/agents/specialists/test-engineer.md +0 -81
- package/ai-config/agents/specialists/ux-consultant.md +0 -76
- package/ai-config/agents/specialized/agent-generator.md +0 -1190
- package/ai-config/agents/specialized/blockchain-developer.md +0 -149
- package/ai-config/agents/specialized/code-migrator.md +0 -892
- package/ai-config/agents/specialized/context-manager.md +0 -978
- package/ai-config/agents/specialized/documentation-writer.md +0 -1078
- package/ai-config/agents/specialized/ecommerce-expert.md +0 -1756
- package/ai-config/agents/specialized/embedded-engineer.md +0 -1714
- package/ai-config/agents/specialized/error-detective.md +0 -1034
- package/ai-config/agents/specialized/fintech-specialist.md +0 -1659
- package/ai-config/agents/specialized/freelance-project-planner-v2.md +0 -1988
- package/ai-config/agents/specialized/freelance-project-planner-v3.md +0 -2136
- package/ai-config/agents/specialized/freelance-project-planner-v4.md +0 -4503
- package/ai-config/agents/specialized/freelance-project-planner.md +0 -722
- package/ai-config/agents/specialized/game-developer.md +0 -1963
- package/ai-config/agents/specialized/healthcare-dev.md +0 -1620
- package/ai-config/agents/specialized/mobile-developer.md +0 -188
- package/ai-config/agents/specialized/parallel-plan-executor.md +0 -506
- package/ai-config/agents/specialized/plan-executor.md +0 -485
- package/ai-config/agents/specialized/solo-dev-planner-modular/00-INDEX.md +0 -485
- package/ai-config/agents/specialized/solo-dev-planner-modular/01-CORE.md +0 -3493
- package/ai-config/agents/specialized/solo-dev-planner-modular/02-SELF-CORRECTION.md +0 -778
- package/ai-config/agents/specialized/solo-dev-planner-modular/03-PROGRESSIVE-SETUP.md +0 -918
- package/ai-config/agents/specialized/solo-dev-planner-modular/04-DEPLOYMENT.md +0 -1537
- package/ai-config/agents/specialized/solo-dev-planner-modular/05-TESTING.md +0 -2633
- package/ai-config/agents/specialized/solo-dev-planner-modular/06-OPERATIONS.md +0 -5610
- package/ai-config/agents/specialized/solo-dev-planner-modular/INSTALL.md +0 -335
- package/ai-config/agents/specialized/solo-dev-planner-modular/QUICK-REFERENCE.txt +0 -215
- package/ai-config/agents/specialized/solo-dev-planner-modular/README.md +0 -260
- package/ai-config/agents/specialized/solo-dev-planner-modular/START-HERE.md +0 -379
- package/ai-config/agents/specialized/solo-dev-planner-modular/WORKFLOW-DIAGRAM.md +0 -355
- package/ai-config/agents/specialized/solo-dev-planner-modular/solo-dev-planner.md +0 -279
- package/ai-config/agents/specialized/template-writer.md +0 -347
- package/ai-config/agents/specialized/test-runner.md +0 -99
- package/ai-config/agents/specialized/vibekanban-smart-worker.md +0 -244
- package/ai-config/agents/specialized/wave-executor.md +0 -138
- package/ai-config/agents/specialized/workflow-optimizer.md +0 -1114
- package/ai-config/commands/git/changelog.md +0 -32
- package/ai-config/commands/git/ci-local.md +0 -70
- package/ai-config/commands/git/commit.md +0 -35
- package/ai-config/commands/git/fix-issue.md +0 -23
- package/ai-config/commands/git/pr-create.md +0 -42
- package/ai-config/commands/git/pr-review.md +0 -50
- package/ai-config/commands/git/worktree.md +0 -39
- package/ai-config/commands/refactoring/cleanup.md +0 -24
- package/ai-config/commands/refactoring/dead-code.md +0 -40
- package/ai-config/commands/refactoring/extract.md +0 -31
- package/ai-config/commands/testing/e2e.md +0 -30
- package/ai-config/commands/testing/tdd.md +0 -36
- package/ai-config/commands/testing/test-coverage.md +0 -30
- package/ai-config/commands/testing/test-fix.md +0 -24
- package/ai-config/commands/workflow/generate-agents-md.md +0 -85
- package/ai-config/commands/workflow/planning.md +0 -47
- package/ai-config/commands/workflows/compound.md +0 -89
- package/ai-config/commands/workflows/diagnose.md +0 -70
- package/ai-config/commands/workflows/discover.md +0 -86
- package/ai-config/commands/workflows/plan.md +0 -77
- package/ai-config/commands/workflows/review.md +0 -78
- package/ai-config/commands/workflows/work.md +0 -75
- package/ai-config/config.yaml +0 -18
- package/ai-config/hooks/_TEMPLATE.md +0 -96
- package/ai-config/hooks/block-dangerous-commands.md +0 -75
- package/ai-config/hooks/commit-guard.md +0 -90
- package/ai-config/hooks/context-loader.md +0 -73
- package/ai-config/hooks/improve-prompt.md +0 -91
- package/ai-config/hooks/learning-log.md +0 -72
- package/ai-config/hooks/model-router.md +0 -86
- package/ai-config/hooks/secret-scanner.md +0 -64
- package/ai-config/hooks/skill-validator.md +0 -102
- package/ai-config/hooks/task-artifact.md +0 -114
- package/ai-config/hooks/validate-workflow.md +0 -100
- package/ai-config/prompts/base.md +0 -71
- package/ai-config/prompts/modes/debug.md +0 -34
- package/ai-config/prompts/modes/deploy.md +0 -40
- package/ai-config/prompts/modes/research.md +0 -32
- package/ai-config/prompts/modes/review.md +0 -33
- package/ai-config/prompts/review-policy.md +0 -79
- package/ai-config/skills/_TEMPLATE.md +0 -157
- package/ai-config/skills/backend/api-gateway/SKILL.md +0 -254
- package/ai-config/skills/backend/bff-concepts/SKILL.md +0 -239
- package/ai-config/skills/backend/bff-spring/SKILL.md +0 -364
- package/ai-config/skills/backend/chi-router/SKILL.md +0 -396
- package/ai-config/skills/backend/error-handling/SKILL.md +0 -255
- package/ai-config/skills/backend/exceptions-spring/SKILL.md +0 -323
- package/ai-config/skills/backend/fastapi/SKILL.md +0 -302
- package/ai-config/skills/backend/gateway-spring/SKILL.md +0 -390
- package/ai-config/skills/backend/go-backend/SKILL.md +0 -457
- package/ai-config/skills/backend/gradle-multimodule/SKILL.md +0 -274
- package/ai-config/skills/backend/graphql-concepts/SKILL.md +0 -352
- package/ai-config/skills/backend/graphql-spring/SKILL.md +0 -398
- package/ai-config/skills/backend/grpc-concepts/SKILL.md +0 -283
- package/ai-config/skills/backend/grpc-spring/SKILL.md +0 -445
- package/ai-config/skills/backend/jwt-auth/SKILL.md +0 -412
- package/ai-config/skills/backend/notifications-concepts/SKILL.md +0 -259
- package/ai-config/skills/backend/recommendations-concepts/SKILL.md +0 -261
- package/ai-config/skills/backend/search-concepts/SKILL.md +0 -263
- package/ai-config/skills/backend/search-spring/SKILL.md +0 -375
- package/ai-config/skills/backend/spring-boot-4/SKILL.md +0 -172
- package/ai-config/skills/backend/websockets/SKILL.md +0 -532
- package/ai-config/skills/data-ai/ai-ml/SKILL.md +0 -423
- package/ai-config/skills/data-ai/analytics-concepts/SKILL.md +0 -195
- package/ai-config/skills/data-ai/analytics-spring/SKILL.md +0 -340
- package/ai-config/skills/data-ai/duckdb-analytics/SKILL.md +0 -440
- package/ai-config/skills/data-ai/langchain/SKILL.md +0 -238
- package/ai-config/skills/data-ai/mlflow/SKILL.md +0 -302
- package/ai-config/skills/data-ai/onnx-inference/SKILL.md +0 -290
- package/ai-config/skills/data-ai/powerbi/SKILL.md +0 -352
- package/ai-config/skills/data-ai/pytorch/SKILL.md +0 -274
- package/ai-config/skills/data-ai/scikit-learn/SKILL.md +0 -321
- package/ai-config/skills/data-ai/vector-db/SKILL.md +0 -301
- package/ai-config/skills/database/graph-databases/SKILL.md +0 -218
- package/ai-config/skills/database/graph-spring/SKILL.md +0 -361
- package/ai-config/skills/database/pgx-postgres/SKILL.md +0 -512
- package/ai-config/skills/database/redis-cache/SKILL.md +0 -343
- package/ai-config/skills/database/sqlite-embedded/SKILL.md +0 -388
- package/ai-config/skills/database/timescaledb/SKILL.md +0 -320
- package/ai-config/skills/docs/api-documentation/SKILL.md +0 -293
- package/ai-config/skills/docs/docs-spring/SKILL.md +0 -377
- package/ai-config/skills/docs/mustache-templates/SKILL.md +0 -190
- package/ai-config/skills/docs/technical-docs/SKILL.md +0 -447
- package/ai-config/skills/frontend/astro-ssr/SKILL.md +0 -441
- package/ai-config/skills/frontend/frontend-design/SKILL.md +0 -54
- package/ai-config/skills/frontend/frontend-web/SKILL.md +0 -368
- package/ai-config/skills/frontend/mantine-ui/SKILL.md +0 -396
- package/ai-config/skills/frontend/tanstack-query/SKILL.md +0 -439
- package/ai-config/skills/frontend/zod-validation/SKILL.md +0 -417
- package/ai-config/skills/frontend/zustand-state/SKILL.md +0 -350
- package/ai-config/skills/infrastructure/chaos-engineering/SKILL.md +0 -244
- package/ai-config/skills/infrastructure/chaos-spring/SKILL.md +0 -378
- package/ai-config/skills/infrastructure/devops-infra/SKILL.md +0 -435
- package/ai-config/skills/infrastructure/docker-containers/SKILL.md +0 -420
- package/ai-config/skills/infrastructure/kubernetes/SKILL.md +0 -456
- package/ai-config/skills/infrastructure/opentelemetry/SKILL.md +0 -546
- package/ai-config/skills/infrastructure/traefik-proxy/SKILL.md +0 -474
- package/ai-config/skills/infrastructure/woodpecker-ci/SKILL.md +0 -315
- package/ai-config/skills/mobile/ionic-capacitor/SKILL.md +0 -504
- package/ai-config/skills/mobile/mobile-ionic/SKILL.md +0 -448
- package/ai-config/skills/prompt-improver/SKILL.md +0 -125
- package/ai-config/skills/quality/ghagga-review/SKILL.md +0 -216
- package/ai-config/skills/references/hooks-patterns/SKILL.md +0 -238
- package/ai-config/skills/references/mcp-servers/SKILL.md +0 -275
- package/ai-config/skills/references/plugins-reference/SKILL.md +0 -110
- package/ai-config/skills/references/skills-reference/SKILL.md +0 -420
- package/ai-config/skills/references/subagent-templates/SKILL.md +0 -193
- package/ai-config/skills/systems-iot/modbus-protocol/SKILL.md +0 -410
- package/ai-config/skills/systems-iot/mqtt-rumqttc/SKILL.md +0 -408
- package/ai-config/skills/systems-iot/rust-systems/SKILL.md +0 -386
- package/ai-config/skills/systems-iot/tokio-async/SKILL.md +0 -324
- package/ai-config/skills/testing/playwright-e2e/SKILL.md +0 -289
- package/ai-config/skills/testing/testcontainers/SKILL.md +0 -299
- package/ai-config/skills/testing/vitest-testing/SKILL.md +0 -381
- package/ai-config/skills/workflow/ci-local-guide/SKILL.md +0 -118
- package/ai-config/skills/workflow/claude-automation-recommender/SKILL.md +0 -299
- package/ai-config/skills/workflow/claude-md-improver/SKILL.md +0 -158
- package/ai-config/skills/workflow/finishing-a-development-branch/SKILL.md +0 -117
- package/ai-config/skills/workflow/git-github/SKILL.md +0 -334
- package/ai-config/skills/workflow/git-github/references/examples.md +0 -160
- package/ai-config/skills/workflow/git-workflow/SKILL.md +0 -214
- package/ai-config/skills/workflow/ide-plugins/SKILL.md +0 -277
- package/ai-config/skills/workflow/ide-plugins-intellij/SKILL.md +0 -401
- package/ai-config/skills/workflow/obsidian-brain-workflow/SKILL.md +0 -199
- package/ai-config/skills/workflow/using-git-worktrees/SKILL.md +0 -100
- package/ai-config/skills/workflow/verification-before-completion/SKILL.md +0 -73
- package/ai-config/skills/workflow/wave-workflow/SKILL.md +0 -178
- package/schemas/agent.schema.json +0 -34
- package/schemas/ai-config.schema.json +0 -28
- package/schemas/plugin.schema.json +0 -62
- package/schemas/skill.schema.json +0 -44
|
@@ -1,474 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: traefik-proxy
|
|
3
|
-
description: >
|
|
4
|
-
Traefik reverse proxy configuration, routing, and middleware patterns.
|
|
5
|
-
Trigger: traefik, reverse proxy, load balancer, ingress, routing, tls
|
|
6
|
-
tools:
|
|
7
|
-
- Read
|
|
8
|
-
- Write
|
|
9
|
-
- Bash
|
|
10
|
-
- Grep
|
|
11
|
-
metadata:
|
|
12
|
-
author: plataforma-industrial
|
|
13
|
-
version: "2.0"
|
|
14
|
-
tags: [traefik, proxy, load-balancer, docker, kubernetes]
|
|
15
|
-
updated: "2026-02"
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
# Traefik Reverse Proxy
|
|
19
|
-
|
|
20
|
-
## Stack Versions
|
|
21
|
-
|
|
22
|
-
```yaml
|
|
23
|
-
Traefik: 3.0+
|
|
24
|
-
Docker Provider: enabled
|
|
25
|
-
Kubernetes Provider: enabled
|
|
26
|
-
Let's Encrypt: enabled
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Docker Compose Setup
|
|
30
|
-
|
|
31
|
-
```yaml
|
|
32
|
-
# docker-compose.yml
|
|
33
|
-
services:
|
|
34
|
-
traefik:
|
|
35
|
-
image: traefik:v3.0
|
|
36
|
-
container_name: traefik
|
|
37
|
-
restart: unless-stopped
|
|
38
|
-
security_opt:
|
|
39
|
-
- no-new-privileges:true
|
|
40
|
-
ports:
|
|
41
|
-
- "80:80"
|
|
42
|
-
- "443:443"
|
|
43
|
-
volumes:
|
|
44
|
-
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
45
|
-
- ./traefik/traefik.yml:/etc/traefik/traefik.yml:ro
|
|
46
|
-
- ./traefik/dynamic:/etc/traefik/dynamic:ro
|
|
47
|
-
- ./traefik/acme.json:/acme.json
|
|
48
|
-
networks:
|
|
49
|
-
- traefik-public
|
|
50
|
-
labels:
|
|
51
|
-
- "traefik.enable=true"
|
|
52
|
-
- "traefik.http.routers.traefik.rule=Host(`traefik.example.com`)"
|
|
53
|
-
- "traefik.http.routers.traefik.service=api@internal"
|
|
54
|
-
- "traefik.http.routers.traefik.middlewares=auth"
|
|
55
|
-
|
|
56
|
-
networks:
|
|
57
|
-
traefik-public:
|
|
58
|
-
external: true
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Static Configuration
|
|
62
|
-
|
|
63
|
-
```yaml
|
|
64
|
-
# traefik/traefik.yml
|
|
65
|
-
global:
|
|
66
|
-
checkNewVersion: false
|
|
67
|
-
sendAnonymousUsage: false
|
|
68
|
-
|
|
69
|
-
log:
|
|
70
|
-
level: INFO
|
|
71
|
-
format: json
|
|
72
|
-
|
|
73
|
-
accessLog:
|
|
74
|
-
format: json
|
|
75
|
-
fields:
|
|
76
|
-
defaultMode: keep
|
|
77
|
-
headers:
|
|
78
|
-
defaultMode: drop
|
|
79
|
-
names:
|
|
80
|
-
User-Agent: keep
|
|
81
|
-
Authorization: redact
|
|
82
|
-
|
|
83
|
-
api:
|
|
84
|
-
dashboard: true
|
|
85
|
-
insecure: false
|
|
86
|
-
|
|
87
|
-
entryPoints:
|
|
88
|
-
web:
|
|
89
|
-
address: ":80"
|
|
90
|
-
http:
|
|
91
|
-
redirections:
|
|
92
|
-
entryPoint:
|
|
93
|
-
to: websecure
|
|
94
|
-
scheme: https
|
|
95
|
-
|
|
96
|
-
websecure:
|
|
97
|
-
address: ":443"
|
|
98
|
-
http:
|
|
99
|
-
tls:
|
|
100
|
-
certResolver: letsencrypt
|
|
101
|
-
domains:
|
|
102
|
-
- main: example.com
|
|
103
|
-
sans:
|
|
104
|
-
- "*.example.com"
|
|
105
|
-
|
|
106
|
-
metrics:
|
|
107
|
-
address: ":8082"
|
|
108
|
-
|
|
109
|
-
providers:
|
|
110
|
-
docker:
|
|
111
|
-
endpoint: "unix:///var/run/docker.sock"
|
|
112
|
-
exposedByDefault: false
|
|
113
|
-
network: traefik-public
|
|
114
|
-
|
|
115
|
-
file:
|
|
116
|
-
directory: /etc/traefik/dynamic
|
|
117
|
-
watch: true
|
|
118
|
-
|
|
119
|
-
certificatesResolvers:
|
|
120
|
-
letsencrypt:
|
|
121
|
-
acme:
|
|
122
|
-
email: admin@example.com
|
|
123
|
-
storage: /acme.json
|
|
124
|
-
httpChallenge:
|
|
125
|
-
entryPoint: web
|
|
126
|
-
|
|
127
|
-
metrics:
|
|
128
|
-
prometheus:
|
|
129
|
-
entryPoint: metrics
|
|
130
|
-
addEntryPointsLabels: true
|
|
131
|
-
addServicesLabels: true
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Dynamic Configuration - Middlewares
|
|
135
|
-
|
|
136
|
-
```yaml
|
|
137
|
-
# traefik/dynamic/middlewares.yml
|
|
138
|
-
http:
|
|
139
|
-
middlewares:
|
|
140
|
-
# Security headers
|
|
141
|
-
secure-headers:
|
|
142
|
-
headers:
|
|
143
|
-
frameDeny: true
|
|
144
|
-
browserXssFilter: true
|
|
145
|
-
contentTypeNosniff: true
|
|
146
|
-
forceSTSHeader: true
|
|
147
|
-
stsIncludeSubdomains: true
|
|
148
|
-
stsPreload: true
|
|
149
|
-
stsSeconds: 31536000
|
|
150
|
-
referrerPolicy: "strict-origin-when-cross-origin"
|
|
151
|
-
|
|
152
|
-
# Rate limiting
|
|
153
|
-
rate-limit:
|
|
154
|
-
rateLimit:
|
|
155
|
-
average: 100
|
|
156
|
-
burst: 50
|
|
157
|
-
period: 1s
|
|
158
|
-
|
|
159
|
-
# IP whitelist
|
|
160
|
-
internal-only:
|
|
161
|
-
ipWhiteList:
|
|
162
|
-
sourceRange:
|
|
163
|
-
- "10.0.0.0/8"
|
|
164
|
-
- "172.16.0.0/12"
|
|
165
|
-
- "192.168.0.0/16"
|
|
166
|
-
|
|
167
|
-
# Compression
|
|
168
|
-
compress:
|
|
169
|
-
compress:
|
|
170
|
-
excludedContentTypes:
|
|
171
|
-
- text/event-stream
|
|
172
|
-
|
|
173
|
-
# Retry
|
|
174
|
-
retry:
|
|
175
|
-
retry:
|
|
176
|
-
attempts: 3
|
|
177
|
-
initialInterval: 100ms
|
|
178
|
-
|
|
179
|
-
# Circuit breaker
|
|
180
|
-
circuit-breaker:
|
|
181
|
-
circuitBreaker:
|
|
182
|
-
expression: "NetworkErrorRatio() > 0.5 || ResponseCodeRatio(500, 600, 0, 600) > 0.5"
|
|
183
|
-
checkPeriod: 10s
|
|
184
|
-
fallbackDuration: 30s
|
|
185
|
-
|
|
186
|
-
# CORS
|
|
187
|
-
cors:
|
|
188
|
-
headers:
|
|
189
|
-
accessControlAllowMethods:
|
|
190
|
-
- GET
|
|
191
|
-
- POST
|
|
192
|
-
- PUT
|
|
193
|
-
- DELETE
|
|
194
|
-
- OPTIONS
|
|
195
|
-
accessControlAllowHeaders:
|
|
196
|
-
- Content-Type
|
|
197
|
-
- Authorization
|
|
198
|
-
accessControlAllowOriginList:
|
|
199
|
-
- https://app.example.com
|
|
200
|
-
accessControlMaxAge: 86400
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
## Service Labels (Docker)
|
|
204
|
-
|
|
205
|
-
### API Service
|
|
206
|
-
|
|
207
|
-
```yaml
|
|
208
|
-
services:
|
|
209
|
-
api:
|
|
210
|
-
image: ghcr.io/org/api:latest
|
|
211
|
-
networks:
|
|
212
|
-
- traefik-public
|
|
213
|
-
- internal
|
|
214
|
-
labels:
|
|
215
|
-
- "traefik.enable=true"
|
|
216
|
-
# Router
|
|
217
|
-
- "traefik.http.routers.api.rule=Host(`api.example.com`)"
|
|
218
|
-
- "traefik.http.routers.api.entrypoints=websecure"
|
|
219
|
-
- "traefik.http.routers.api.tls.certresolver=letsencrypt"
|
|
220
|
-
# Service
|
|
221
|
-
- "traefik.http.services.api.loadbalancer.server.port=8080"
|
|
222
|
-
- "traefik.http.services.api.loadbalancer.healthcheck.path=/health"
|
|
223
|
-
- "traefik.http.services.api.loadbalancer.healthcheck.interval=10s"
|
|
224
|
-
# Middlewares
|
|
225
|
-
- "traefik.http.routers.api.middlewares=secure-headers,rate-limit,cors,compress"
|
|
226
|
-
# Sticky sessions
|
|
227
|
-
- "traefik.http.services.api.loadbalancer.sticky.cookie=true"
|
|
228
|
-
- "traefik.http.services.api.loadbalancer.sticky.cookie.name=api_session"
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
### Path-Based Routing
|
|
232
|
-
|
|
233
|
-
```yaml
|
|
234
|
-
services:
|
|
235
|
-
ai-service:
|
|
236
|
-
labels:
|
|
237
|
-
- "traefik.enable=true"
|
|
238
|
-
- "traefik.http.routers.ai.rule=Host(`api.example.com`) && PathPrefix(`/ai`)"
|
|
239
|
-
- "traefik.http.routers.ai.entrypoints=websecure"
|
|
240
|
-
- "traefik.http.services.ai.loadbalancer.server.port=8000"
|
|
241
|
-
# Strip prefix
|
|
242
|
-
- "traefik.http.middlewares.ai-strip.stripprefix.prefixes=/ai"
|
|
243
|
-
- "traefik.http.routers.ai.middlewares=secure-headers,rate-limit,ai-strip"
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
### WebSocket Service
|
|
247
|
-
|
|
248
|
-
```yaml
|
|
249
|
-
services:
|
|
250
|
-
websocket:
|
|
251
|
-
labels:
|
|
252
|
-
- "traefik.enable=true"
|
|
253
|
-
- "traefik.http.routers.ws.rule=Host(`ws.example.com`)"
|
|
254
|
-
- "traefik.http.routers.ws.entrypoints=websecure"
|
|
255
|
-
- "traefik.http.services.ws.loadbalancer.server.port=8080"
|
|
256
|
-
# Sticky sessions for WebSocket
|
|
257
|
-
- "traefik.http.services.ws.loadbalancer.sticky.cookie=true"
|
|
258
|
-
- "traefik.http.services.ws.loadbalancer.sticky.cookie.httpOnly=true"
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
## Weighted Load Balancing (Canary)
|
|
262
|
-
|
|
263
|
-
```yaml
|
|
264
|
-
# traefik/dynamic/canary.yml
|
|
265
|
-
http:
|
|
266
|
-
services:
|
|
267
|
-
api-weighted:
|
|
268
|
-
weighted:
|
|
269
|
-
services:
|
|
270
|
-
- name: api-stable
|
|
271
|
-
weight: 90
|
|
272
|
-
- name: api-canary
|
|
273
|
-
weight: 10
|
|
274
|
-
|
|
275
|
-
api-stable:
|
|
276
|
-
loadBalancer:
|
|
277
|
-
servers:
|
|
278
|
-
- url: "http://api-v1:8080"
|
|
279
|
-
|
|
280
|
-
api-canary:
|
|
281
|
-
loadBalancer:
|
|
282
|
-
servers:
|
|
283
|
-
- url: "http://api-v2:8080"
|
|
284
|
-
|
|
285
|
-
routers:
|
|
286
|
-
api-canary:
|
|
287
|
-
rule: "Host(`api.example.com`)"
|
|
288
|
-
service: api-weighted
|
|
289
|
-
entryPoints:
|
|
290
|
-
- websecure
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
## Path-Based Routing (File Config)
|
|
294
|
-
|
|
295
|
-
```yaml
|
|
296
|
-
# traefik/dynamic/routes.yml
|
|
297
|
-
http:
|
|
298
|
-
routers:
|
|
299
|
-
api-v1:
|
|
300
|
-
rule: "Host(`api.example.com`) && PathPrefix(`/v1`)"
|
|
301
|
-
service: api
|
|
302
|
-
entryPoints:
|
|
303
|
-
- websecure
|
|
304
|
-
middlewares:
|
|
305
|
-
- secure-headers
|
|
306
|
-
- rate-limit
|
|
307
|
-
|
|
308
|
-
api-v2:
|
|
309
|
-
rule: "Host(`api.example.com`) && PathPrefix(`/v2`)"
|
|
310
|
-
service: api-v2
|
|
311
|
-
entryPoints:
|
|
312
|
-
- websecure
|
|
313
|
-
|
|
314
|
-
services:
|
|
315
|
-
api:
|
|
316
|
-
loadBalancer:
|
|
317
|
-
servers:
|
|
318
|
-
- url: "http://api:8080"
|
|
319
|
-
healthCheck:
|
|
320
|
-
path: /health
|
|
321
|
-
interval: 10s
|
|
322
|
-
|
|
323
|
-
api-v2:
|
|
324
|
-
loadBalancer:
|
|
325
|
-
servers:
|
|
326
|
-
- url: "http://api-v2:8080"
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
## Kubernetes IngressRoute
|
|
330
|
-
|
|
331
|
-
```yaml
|
|
332
|
-
apiVersion: traefik.io/v1alpha1
|
|
333
|
-
kind: IngressRoute
|
|
334
|
-
metadata:
|
|
335
|
-
name: api
|
|
336
|
-
namespace: myapp
|
|
337
|
-
spec:
|
|
338
|
-
entryPoints:
|
|
339
|
-
- websecure
|
|
340
|
-
routes:
|
|
341
|
-
- match: Host(`api.example.com`)
|
|
342
|
-
kind: Rule
|
|
343
|
-
services:
|
|
344
|
-
- name: api
|
|
345
|
-
port: 80
|
|
346
|
-
middlewares:
|
|
347
|
-
- name: rate-limit
|
|
348
|
-
- name: secure-headers
|
|
349
|
-
tls:
|
|
350
|
-
certResolver: letsencrypt
|
|
351
|
-
---
|
|
352
|
-
apiVersion: traefik.io/v1alpha1
|
|
353
|
-
kind: Middleware
|
|
354
|
-
metadata:
|
|
355
|
-
name: rate-limit
|
|
356
|
-
namespace: myapp
|
|
357
|
-
spec:
|
|
358
|
-
rateLimit:
|
|
359
|
-
average: 100
|
|
360
|
-
burst: 50
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
## TLS Configuration
|
|
364
|
-
|
|
365
|
-
```yaml
|
|
366
|
-
# traefik/dynamic/tls.yml
|
|
367
|
-
tls:
|
|
368
|
-
options:
|
|
369
|
-
default:
|
|
370
|
-
minVersion: VersionTLS12
|
|
371
|
-
cipherSuites:
|
|
372
|
-
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
|
|
373
|
-
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
|
374
|
-
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
|
|
375
|
-
curvePreferences:
|
|
376
|
-
- secp521r1
|
|
377
|
-
- secp384r1
|
|
378
|
-
|
|
379
|
-
modern:
|
|
380
|
-
minVersion: VersionTLS13
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
## Health Checks
|
|
384
|
-
|
|
385
|
-
```yaml
|
|
386
|
-
# traefik/dynamic/healthcheck.yml
|
|
387
|
-
http:
|
|
388
|
-
services:
|
|
389
|
-
api:
|
|
390
|
-
loadBalancer:
|
|
391
|
-
servers:
|
|
392
|
-
- url: "http://api-1:8080"
|
|
393
|
-
- url: "http://api-2:8080"
|
|
394
|
-
- url: "http://api-3:8080"
|
|
395
|
-
healthCheck:
|
|
396
|
-
path: /health
|
|
397
|
-
interval: 10s
|
|
398
|
-
timeout: 3s
|
|
399
|
-
scheme: http
|
|
400
|
-
headers:
|
|
401
|
-
X-Health-Check: traefik
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
## Monitoring - Prometheus Queries
|
|
405
|
-
|
|
406
|
-
```promql
|
|
407
|
-
# Request rate by service
|
|
408
|
-
sum(rate(traefik_service_requests_total[5m])) by (service)
|
|
409
|
-
|
|
410
|
-
# Error rate
|
|
411
|
-
sum(rate(traefik_service_requests_total{code=~"5.."}[5m])) by (service)
|
|
412
|
-
/ sum(rate(traefik_service_requests_total[5m])) by (service)
|
|
413
|
-
|
|
414
|
-
# Response time p99
|
|
415
|
-
histogram_quantile(0.99,
|
|
416
|
-
sum(rate(traefik_service_request_duration_seconds_bucket[5m])) by (le, service)
|
|
417
|
-
)
|
|
418
|
-
|
|
419
|
-
# Open connections
|
|
420
|
-
traefik_entrypoint_open_connections
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
## Best Practices
|
|
424
|
-
|
|
425
|
-
1. **Always use TLS** - Redirect HTTP to HTTPS
|
|
426
|
-
```yaml
|
|
427
|
-
entryPoints:
|
|
428
|
-
web:
|
|
429
|
-
http:
|
|
430
|
-
redirections:
|
|
431
|
-
entryPoint:
|
|
432
|
-
to: websecure
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
2. **Set security headers** - Prevent XSS, clickjacking
|
|
436
|
-
```yaml
|
|
437
|
-
middlewares:
|
|
438
|
-
secure-headers:
|
|
439
|
-
headers:
|
|
440
|
-
frameDeny: true
|
|
441
|
-
browserXssFilter: true
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
3. **Rate limit public endpoints** - Prevent abuse
|
|
445
|
-
```yaml
|
|
446
|
-
middlewares:
|
|
447
|
-
rate-limit:
|
|
448
|
-
rateLimit:
|
|
449
|
-
average: 100
|
|
450
|
-
burst: 50
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
4. **Use health checks** - Route traffic to healthy backends
|
|
454
|
-
```yaml
|
|
455
|
-
services:
|
|
456
|
-
api:
|
|
457
|
-
loadBalancer:
|
|
458
|
-
healthCheck:
|
|
459
|
-
path: /health
|
|
460
|
-
interval: 10s
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
5. **Enable access logs** - For debugging and auditing
|
|
464
|
-
```yaml
|
|
465
|
-
accessLog:
|
|
466
|
-
format: json
|
|
467
|
-
```
|
|
468
|
-
|
|
469
|
-
## Related Skills
|
|
470
|
-
|
|
471
|
-
- `kubernetes`: K8s ingress controller
|
|
472
|
-
- `docker-containers`: Docker provider
|
|
473
|
-
- `jwt-auth`: Auth middleware
|
|
474
|
-
- `opentelemetry`: Tracing integration
|