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.
Files changed (228) hide show
  1. package/ci-local/ci-local.sh +20 -8
  2. package/package.json +1 -1
  3. package/ai-config/.skillignore +0 -15
  4. package/ai-config/AUTO_INVOKE.md +0 -300
  5. package/ai-config/agents/_TEMPLATE.md +0 -93
  6. package/ai-config/agents/business/api-designer.md +0 -1657
  7. package/ai-config/agents/business/business-analyst.md +0 -1331
  8. package/ai-config/agents/business/product-strategist.md +0 -206
  9. package/ai-config/agents/business/project-manager.md +0 -178
  10. package/ai-config/agents/business/requirements-analyst.md +0 -1277
  11. package/ai-config/agents/business/technical-writer.md +0 -1679
  12. package/ai-config/agents/creative/ux-designer.md +0 -205
  13. package/ai-config/agents/data-ai/ai-engineer.md +0 -487
  14. package/ai-config/agents/data-ai/analytics-engineer.md +0 -953
  15. package/ai-config/agents/data-ai/data-engineer.md +0 -173
  16. package/ai-config/agents/data-ai/data-scientist.md +0 -672
  17. package/ai-config/agents/data-ai/mlops-engineer.md +0 -814
  18. package/ai-config/agents/data-ai/prompt-engineer.md +0 -772
  19. package/ai-config/agents/development/angular-expert.md +0 -620
  20. package/ai-config/agents/development/backend-architect.md +0 -795
  21. package/ai-config/agents/development/database-specialist.md +0 -212
  22. package/ai-config/agents/development/frontend-specialist.md +0 -686
  23. package/ai-config/agents/development/fullstack-engineer.md +0 -668
  24. package/ai-config/agents/development/golang-pro.md +0 -338
  25. package/ai-config/agents/development/java-enterprise.md +0 -400
  26. package/ai-config/agents/development/javascript-pro.md +0 -422
  27. package/ai-config/agents/development/nextjs-pro.md +0 -474
  28. package/ai-config/agents/development/python-pro.md +0 -570
  29. package/ai-config/agents/development/react-pro.md +0 -487
  30. package/ai-config/agents/development/rust-pro.md +0 -246
  31. package/ai-config/agents/development/spring-boot-4-expert.md +0 -326
  32. package/ai-config/agents/development/typescript-pro.md +0 -336
  33. package/ai-config/agents/development/vue-specialist.md +0 -605
  34. package/ai-config/agents/infrastructure/cloud-architect.md +0 -472
  35. package/ai-config/agents/infrastructure/deployment-manager.md +0 -358
  36. package/ai-config/agents/infrastructure/devops-engineer.md +0 -455
  37. package/ai-config/agents/infrastructure/incident-responder.md +0 -519
  38. package/ai-config/agents/infrastructure/kubernetes-expert.md +0 -705
  39. package/ai-config/agents/infrastructure/monitoring-specialist.md +0 -674
  40. package/ai-config/agents/infrastructure/performance-engineer.md +0 -658
  41. package/ai-config/agents/orchestrator.md +0 -241
  42. package/ai-config/agents/quality/accessibility-auditor.md +0 -1204
  43. package/ai-config/agents/quality/code-reviewer-compact.md +0 -123
  44. package/ai-config/agents/quality/code-reviewer.md +0 -363
  45. package/ai-config/agents/quality/dependency-manager.md +0 -743
  46. package/ai-config/agents/quality/e2e-test-specialist.md +0 -1005
  47. package/ai-config/agents/quality/performance-tester.md +0 -1086
  48. package/ai-config/agents/quality/security-auditor.md +0 -133
  49. package/ai-config/agents/quality/test-engineer.md +0 -453
  50. package/ai-config/agents/specialists/api-designer.md +0 -87
  51. package/ai-config/agents/specialists/backend-architect.md +0 -73
  52. package/ai-config/agents/specialists/code-reviewer.md +0 -77
  53. package/ai-config/agents/specialists/db-optimizer.md +0 -75
  54. package/ai-config/agents/specialists/devops-engineer.md +0 -83
  55. package/ai-config/agents/specialists/documentation-writer.md +0 -78
  56. package/ai-config/agents/specialists/frontend-developer.md +0 -75
  57. package/ai-config/agents/specialists/performance-analyst.md +0 -82
  58. package/ai-config/agents/specialists/refactor-specialist.md +0 -74
  59. package/ai-config/agents/specialists/security-auditor.md +0 -74
  60. package/ai-config/agents/specialists/test-engineer.md +0 -81
  61. package/ai-config/agents/specialists/ux-consultant.md +0 -76
  62. package/ai-config/agents/specialized/agent-generator.md +0 -1190
  63. package/ai-config/agents/specialized/blockchain-developer.md +0 -149
  64. package/ai-config/agents/specialized/code-migrator.md +0 -892
  65. package/ai-config/agents/specialized/context-manager.md +0 -978
  66. package/ai-config/agents/specialized/documentation-writer.md +0 -1078
  67. package/ai-config/agents/specialized/ecommerce-expert.md +0 -1756
  68. package/ai-config/agents/specialized/embedded-engineer.md +0 -1714
  69. package/ai-config/agents/specialized/error-detective.md +0 -1034
  70. package/ai-config/agents/specialized/fintech-specialist.md +0 -1659
  71. package/ai-config/agents/specialized/freelance-project-planner-v2.md +0 -1988
  72. package/ai-config/agents/specialized/freelance-project-planner-v3.md +0 -2136
  73. package/ai-config/agents/specialized/freelance-project-planner-v4.md +0 -4503
  74. package/ai-config/agents/specialized/freelance-project-planner.md +0 -722
  75. package/ai-config/agents/specialized/game-developer.md +0 -1963
  76. package/ai-config/agents/specialized/healthcare-dev.md +0 -1620
  77. package/ai-config/agents/specialized/mobile-developer.md +0 -188
  78. package/ai-config/agents/specialized/parallel-plan-executor.md +0 -506
  79. package/ai-config/agents/specialized/plan-executor.md +0 -485
  80. package/ai-config/agents/specialized/solo-dev-planner-modular/00-INDEX.md +0 -485
  81. package/ai-config/agents/specialized/solo-dev-planner-modular/01-CORE.md +0 -3493
  82. package/ai-config/agents/specialized/solo-dev-planner-modular/02-SELF-CORRECTION.md +0 -778
  83. package/ai-config/agents/specialized/solo-dev-planner-modular/03-PROGRESSIVE-SETUP.md +0 -918
  84. package/ai-config/agents/specialized/solo-dev-planner-modular/04-DEPLOYMENT.md +0 -1537
  85. package/ai-config/agents/specialized/solo-dev-planner-modular/05-TESTING.md +0 -2633
  86. package/ai-config/agents/specialized/solo-dev-planner-modular/06-OPERATIONS.md +0 -5610
  87. package/ai-config/agents/specialized/solo-dev-planner-modular/INSTALL.md +0 -335
  88. package/ai-config/agents/specialized/solo-dev-planner-modular/QUICK-REFERENCE.txt +0 -215
  89. package/ai-config/agents/specialized/solo-dev-planner-modular/README.md +0 -260
  90. package/ai-config/agents/specialized/solo-dev-planner-modular/START-HERE.md +0 -379
  91. package/ai-config/agents/specialized/solo-dev-planner-modular/WORKFLOW-DIAGRAM.md +0 -355
  92. package/ai-config/agents/specialized/solo-dev-planner-modular/solo-dev-planner.md +0 -279
  93. package/ai-config/agents/specialized/template-writer.md +0 -347
  94. package/ai-config/agents/specialized/test-runner.md +0 -99
  95. package/ai-config/agents/specialized/vibekanban-smart-worker.md +0 -244
  96. package/ai-config/agents/specialized/wave-executor.md +0 -138
  97. package/ai-config/agents/specialized/workflow-optimizer.md +0 -1114
  98. package/ai-config/commands/git/changelog.md +0 -32
  99. package/ai-config/commands/git/ci-local.md +0 -70
  100. package/ai-config/commands/git/commit.md +0 -35
  101. package/ai-config/commands/git/fix-issue.md +0 -23
  102. package/ai-config/commands/git/pr-create.md +0 -42
  103. package/ai-config/commands/git/pr-review.md +0 -50
  104. package/ai-config/commands/git/worktree.md +0 -39
  105. package/ai-config/commands/refactoring/cleanup.md +0 -24
  106. package/ai-config/commands/refactoring/dead-code.md +0 -40
  107. package/ai-config/commands/refactoring/extract.md +0 -31
  108. package/ai-config/commands/testing/e2e.md +0 -30
  109. package/ai-config/commands/testing/tdd.md +0 -36
  110. package/ai-config/commands/testing/test-coverage.md +0 -30
  111. package/ai-config/commands/testing/test-fix.md +0 -24
  112. package/ai-config/commands/workflow/generate-agents-md.md +0 -85
  113. package/ai-config/commands/workflow/planning.md +0 -47
  114. package/ai-config/commands/workflows/compound.md +0 -89
  115. package/ai-config/commands/workflows/diagnose.md +0 -70
  116. package/ai-config/commands/workflows/discover.md +0 -86
  117. package/ai-config/commands/workflows/plan.md +0 -77
  118. package/ai-config/commands/workflows/review.md +0 -78
  119. package/ai-config/commands/workflows/work.md +0 -75
  120. package/ai-config/config.yaml +0 -18
  121. package/ai-config/hooks/_TEMPLATE.md +0 -96
  122. package/ai-config/hooks/block-dangerous-commands.md +0 -75
  123. package/ai-config/hooks/commit-guard.md +0 -90
  124. package/ai-config/hooks/context-loader.md +0 -73
  125. package/ai-config/hooks/improve-prompt.md +0 -91
  126. package/ai-config/hooks/learning-log.md +0 -72
  127. package/ai-config/hooks/model-router.md +0 -86
  128. package/ai-config/hooks/secret-scanner.md +0 -64
  129. package/ai-config/hooks/skill-validator.md +0 -102
  130. package/ai-config/hooks/task-artifact.md +0 -114
  131. package/ai-config/hooks/validate-workflow.md +0 -100
  132. package/ai-config/prompts/base.md +0 -71
  133. package/ai-config/prompts/modes/debug.md +0 -34
  134. package/ai-config/prompts/modes/deploy.md +0 -40
  135. package/ai-config/prompts/modes/research.md +0 -32
  136. package/ai-config/prompts/modes/review.md +0 -33
  137. package/ai-config/prompts/review-policy.md +0 -79
  138. package/ai-config/skills/_TEMPLATE.md +0 -157
  139. package/ai-config/skills/backend/api-gateway/SKILL.md +0 -254
  140. package/ai-config/skills/backend/bff-concepts/SKILL.md +0 -239
  141. package/ai-config/skills/backend/bff-spring/SKILL.md +0 -364
  142. package/ai-config/skills/backend/chi-router/SKILL.md +0 -396
  143. package/ai-config/skills/backend/error-handling/SKILL.md +0 -255
  144. package/ai-config/skills/backend/exceptions-spring/SKILL.md +0 -323
  145. package/ai-config/skills/backend/fastapi/SKILL.md +0 -302
  146. package/ai-config/skills/backend/gateway-spring/SKILL.md +0 -390
  147. package/ai-config/skills/backend/go-backend/SKILL.md +0 -457
  148. package/ai-config/skills/backend/gradle-multimodule/SKILL.md +0 -274
  149. package/ai-config/skills/backend/graphql-concepts/SKILL.md +0 -352
  150. package/ai-config/skills/backend/graphql-spring/SKILL.md +0 -398
  151. package/ai-config/skills/backend/grpc-concepts/SKILL.md +0 -283
  152. package/ai-config/skills/backend/grpc-spring/SKILL.md +0 -445
  153. package/ai-config/skills/backend/jwt-auth/SKILL.md +0 -412
  154. package/ai-config/skills/backend/notifications-concepts/SKILL.md +0 -259
  155. package/ai-config/skills/backend/recommendations-concepts/SKILL.md +0 -261
  156. package/ai-config/skills/backend/search-concepts/SKILL.md +0 -263
  157. package/ai-config/skills/backend/search-spring/SKILL.md +0 -375
  158. package/ai-config/skills/backend/spring-boot-4/SKILL.md +0 -172
  159. package/ai-config/skills/backend/websockets/SKILL.md +0 -532
  160. package/ai-config/skills/data-ai/ai-ml/SKILL.md +0 -423
  161. package/ai-config/skills/data-ai/analytics-concepts/SKILL.md +0 -195
  162. package/ai-config/skills/data-ai/analytics-spring/SKILL.md +0 -340
  163. package/ai-config/skills/data-ai/duckdb-analytics/SKILL.md +0 -440
  164. package/ai-config/skills/data-ai/langchain/SKILL.md +0 -238
  165. package/ai-config/skills/data-ai/mlflow/SKILL.md +0 -302
  166. package/ai-config/skills/data-ai/onnx-inference/SKILL.md +0 -290
  167. package/ai-config/skills/data-ai/powerbi/SKILL.md +0 -352
  168. package/ai-config/skills/data-ai/pytorch/SKILL.md +0 -274
  169. package/ai-config/skills/data-ai/scikit-learn/SKILL.md +0 -321
  170. package/ai-config/skills/data-ai/vector-db/SKILL.md +0 -301
  171. package/ai-config/skills/database/graph-databases/SKILL.md +0 -218
  172. package/ai-config/skills/database/graph-spring/SKILL.md +0 -361
  173. package/ai-config/skills/database/pgx-postgres/SKILL.md +0 -512
  174. package/ai-config/skills/database/redis-cache/SKILL.md +0 -343
  175. package/ai-config/skills/database/sqlite-embedded/SKILL.md +0 -388
  176. package/ai-config/skills/database/timescaledb/SKILL.md +0 -320
  177. package/ai-config/skills/docs/api-documentation/SKILL.md +0 -293
  178. package/ai-config/skills/docs/docs-spring/SKILL.md +0 -377
  179. package/ai-config/skills/docs/mustache-templates/SKILL.md +0 -190
  180. package/ai-config/skills/docs/technical-docs/SKILL.md +0 -447
  181. package/ai-config/skills/frontend/astro-ssr/SKILL.md +0 -441
  182. package/ai-config/skills/frontend/frontend-design/SKILL.md +0 -54
  183. package/ai-config/skills/frontend/frontend-web/SKILL.md +0 -368
  184. package/ai-config/skills/frontend/mantine-ui/SKILL.md +0 -396
  185. package/ai-config/skills/frontend/tanstack-query/SKILL.md +0 -439
  186. package/ai-config/skills/frontend/zod-validation/SKILL.md +0 -417
  187. package/ai-config/skills/frontend/zustand-state/SKILL.md +0 -350
  188. package/ai-config/skills/infrastructure/chaos-engineering/SKILL.md +0 -244
  189. package/ai-config/skills/infrastructure/chaos-spring/SKILL.md +0 -378
  190. package/ai-config/skills/infrastructure/devops-infra/SKILL.md +0 -435
  191. package/ai-config/skills/infrastructure/docker-containers/SKILL.md +0 -420
  192. package/ai-config/skills/infrastructure/kubernetes/SKILL.md +0 -456
  193. package/ai-config/skills/infrastructure/opentelemetry/SKILL.md +0 -546
  194. package/ai-config/skills/infrastructure/traefik-proxy/SKILL.md +0 -474
  195. package/ai-config/skills/infrastructure/woodpecker-ci/SKILL.md +0 -315
  196. package/ai-config/skills/mobile/ionic-capacitor/SKILL.md +0 -504
  197. package/ai-config/skills/mobile/mobile-ionic/SKILL.md +0 -448
  198. package/ai-config/skills/prompt-improver/SKILL.md +0 -125
  199. package/ai-config/skills/quality/ghagga-review/SKILL.md +0 -216
  200. package/ai-config/skills/references/hooks-patterns/SKILL.md +0 -238
  201. package/ai-config/skills/references/mcp-servers/SKILL.md +0 -275
  202. package/ai-config/skills/references/plugins-reference/SKILL.md +0 -110
  203. package/ai-config/skills/references/skills-reference/SKILL.md +0 -420
  204. package/ai-config/skills/references/subagent-templates/SKILL.md +0 -193
  205. package/ai-config/skills/systems-iot/modbus-protocol/SKILL.md +0 -410
  206. package/ai-config/skills/systems-iot/mqtt-rumqttc/SKILL.md +0 -408
  207. package/ai-config/skills/systems-iot/rust-systems/SKILL.md +0 -386
  208. package/ai-config/skills/systems-iot/tokio-async/SKILL.md +0 -324
  209. package/ai-config/skills/testing/playwright-e2e/SKILL.md +0 -289
  210. package/ai-config/skills/testing/testcontainers/SKILL.md +0 -299
  211. package/ai-config/skills/testing/vitest-testing/SKILL.md +0 -381
  212. package/ai-config/skills/workflow/ci-local-guide/SKILL.md +0 -118
  213. package/ai-config/skills/workflow/claude-automation-recommender/SKILL.md +0 -299
  214. package/ai-config/skills/workflow/claude-md-improver/SKILL.md +0 -158
  215. package/ai-config/skills/workflow/finishing-a-development-branch/SKILL.md +0 -117
  216. package/ai-config/skills/workflow/git-github/SKILL.md +0 -334
  217. package/ai-config/skills/workflow/git-github/references/examples.md +0 -160
  218. package/ai-config/skills/workflow/git-workflow/SKILL.md +0 -214
  219. package/ai-config/skills/workflow/ide-plugins/SKILL.md +0 -277
  220. package/ai-config/skills/workflow/ide-plugins-intellij/SKILL.md +0 -401
  221. package/ai-config/skills/workflow/obsidian-brain-workflow/SKILL.md +0 -199
  222. package/ai-config/skills/workflow/using-git-worktrees/SKILL.md +0 -100
  223. package/ai-config/skills/workflow/verification-before-completion/SKILL.md +0 -73
  224. package/ai-config/skills/workflow/wave-workflow/SKILL.md +0 -178
  225. package/schemas/agent.schema.json +0 -34
  226. package/schemas/ai-config.schema.json +0 -28
  227. package/schemas/plugin.schema.json +0 -62
  228. 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